19,547 reputation
94673
bio website ericlippert.com
location Seattle, WA
age 42
visits member for 4 years, 2 months
seen Dec 16 at 14:11

Eric Lippert develops C# analyzers at Coverity. During his sixteen years at Microsoft he was a developer of the Visual Basic, VBScript, JScript and C# compilers and a member of the C# language design committee; he is now a C# MVP. He is on Twitter at "@ericlippert" and writes a blog about programming language design and other fabulous adventures in coding at http://ericlippert.com.


Nov
23
awarded  Good Answer
Oct
26
awarded  Yearling
Oct
16
comment Name for this type of parser, OR why it doesn't exist
Are you possibly looking for monadic parser combinators -- that is, a larger parser composed of several smaller parsers. They are handy for situations where an "island" of one language is embedded in another. My former colleague on the C# design team Luke Hoban has a good article on them: blogs.msdn.com/b/lukeh/archive/2007/08/19/…
Sep
28
comment Why do most programming languages have special keyword or syntax for declaring functions?
The question "why do you need a syntax for nominal functions if you have lambdas and variables?" is reasonable, but why stop there? Why have a syntax for events? An event is just a rule for combining functions. Why have properties? Just a pair of functions. Why have strings? Strings are just functions that take integers and return characters. Why have integers? Just use Church Numerals as your integers. In fact, why have anything at all except the S and K combinator?
Sep
28
comment Why do most programming languages have special keyword or syntax for declaring functions?
C# had anonymous functions -- which are just lambdas without type inference and a clunky syntax -- since 2005.
Sep
9
awarded  Good Answer
Sep
8
awarded  Good Answer
Sep
8
comment What is a “lifted representation”?
I discuss the meaning of "lifted" in the context of C# here: blogs.msdn.com/b/ericlippert/archive/2007/06/27/… -- likely the Scala developers are using the term in an analogous, but more general fashion.
Sep
8
comment What is a “lifted representation”?
A perhaps more clear example of "lifting" is lifting to nullable (or "optional" or "maybe") types. For example, suppose you have an operator + defined such that int + int --> int. The lifted-to-nullable operator int? + int? --> int? has the semantics of "if either operand is null then the answer is null, otherwise use the non-lifted operator on the values".
Sep
8
comment Why is the use of conjunctions in method names a bad naming convention?
Consider: (1) using "optional" rather than "or null". "GetOptionalEntity" sounds better to my ear than "GetEntityOrNull". (2) the .NET base class library uses the convention that if you have two methods that differ only in what they throw, name the one that cannot throw "TryBlah". For example, Int32.TryParse and Int32.Parse -- both parse a string into an integer, but the former returns a Boolean indicating success and the latter throws on failure.
Sep
8
comment What's wrong with comments that explain complex code?
Rather than answering your question here I've posted some thoughts to my blog. ericlippert.com/2014/09/08/comment-commentary. In short: a complex algorithm should have a specification, and the comments should refer to that specification.
Sep
5
awarded  Enlightened
Sep
2
comment The Definition of “Strong Type Systems”
@supercat: The VB6 and VBScript type systems back in the day also had many bizarre aspects like that. The type system attempted to work out which operand of a given operator was more "slippable" into another type, eg, comparing the literal 2 against a variant containing a string could have different results than comparing a variant containing 2 to a literal string. It thoroughly broke the fundamental rule of late-binding: that runtime-bound behavior behave as though the types had been known at compile time.
Sep
2
comment The Definition of “Strong Type Systems”
@JimmyHoffa: C was a bad example on my part; in retrospect one certainly does think of instantiating structs and accessing fields, which are members.
Sep
2
comment The Definition of “Strong Type Systems”
@JimmyHoffa: What does "members of an instance" have to do with it? A language need not even have the concepts of "members" and "instances" -- C has no such concept, but C has a type system.
Sep
2
awarded  Nice Answer
Sep
2
comment The Definition of “Strong Type Systems”
I would not call C++ strongly typed because by "strongly typed" I might choose to mean "every object has a type and can describe that type at runtime", which is not true of all implementations of C++. That is true of JavaScript, so JavaScript is strongly typed and C++ is weakly typed.
Sep
2
revised The Definition of “Strong Type Systems”
added 245 characters in body
Sep
2
revised The Definition of “Strong Type Systems”
added 245 characters in body
Sep
2
answered The Definition of “Strong Type Systems”