Skip to main content

Home/ Coders/ Group items tagged cli

Rss Feed Group items tagged

Matteo Spreafico

Fabulous Adventures In Coding : The Stack Is An Implementation Detail, Part One - 0 views

  • Almost every article I see that describes the difference between value types and reference types explains in (frequently incorrect) detail about what “the stack” is and how the major difference between value types and reference types is that value types go on the stack.
  • I find this characterization of a value type based on its implementation details rather than its observable characteristics to be both confusing and unfortunate. Surely the most relevant fact about value types is not the implementation detail of how they are allocated, but rather the by-design semantic meaning of “value type”, namely that they are always copied “by value”.
  • Of course, the simplistic statement I described is not even true. As the MSDN documentation correctly notes, value types are allocated on the stack sometimes. For example, the memory for an integer field in a class type is part of the class instance’s memory, which is allocated on the heap.
  • ...3 more annotations...
  • As long as the implementation maintains the semantics guaranteed by the specification, it can choose any strategy it likes for generating efficient code
  • That Windows typically does so, and that this one-meg array is an efficient place to store small amounts of short-lived data is great, but it’s not a requirement that an operating system provide such a structure, or that the jitter use it. The jitter could choose to put every local “on the heap” and live with the performance cost of doing so, as long as the value type semantics were maintained
  • I would only be making that choice if profiling data showed that there was a large, real-world-customer-impacting performance problem directly mitigated by using value types. Absent such data, I’d always make the choice of value type vs reference type based on whether the type is semantically representing a value or semantically a reference to something.
David Corking

Alarming Development : JavaScript is good enough | Jan 2009 - 0 views

  • It is impossible to build a hash table in JavaScript that works on arbitrary objects. You would have to manually allocate unique ID’s for every object and include them in the toString. So no collections in JavaScript. Adobe provides a true built-in hashtable in ActionScript 3.
  • Objects can function as sets and maps. Arrays can function as lists and iterators (generate an array when you need an iterator). More that good enough in this context.
  • VB also often compiles down to better MSIL than C#. It is also the only .NET language with first-class edit-and-continue Lisp-like debugging capabilities.
  • ...1 more annotation...
  • a good collection library should support a meta-object protocol with features like rejecting changes. This allows collections to be passed around as references,
    An old-fashioned language war, 2009 style. Visual Basic even gets a mention as "Lisp-like" (for its debugging.)
Joel Bennett

Expect - Wikipedia - 0 views

    Expect is an extension to the Tcl scripting language to create an automation and testing tool for CLI applications such as telnet, ftp, passwd, fsck, rlogin, tip, ssh, et., and because it wraps the standard command-line interface, it can be used to automate any arbitrary applications that are accessed over a terminal.
Joel Bennett

Microsoft Command Line Standard - 0 views

  • our goal is to present a consistent, composable command line user experience. Achieving that allows a user to learn a core set of concepts (syntax, naming, behaviors, etc) and then be able to translate that knowledge into working with a large set of commands. Those commands should be able to output standardized streams of data in a standardized format to allow easy composition without the burden of parsing streams of output text.
    Microsoft's new "Command Line Standard" guidance on how to write applications which behave nicely as part of a command line interface pipeline ... specifically, PowerShell Commandlets implement most of this by default, but this willl allow unmanaged apps to better coexist in the PowerShell world ...
1 - 4 of 4
Showing 20 items per page