Reputation
7,382
Next privilege 10,000 Rep.
Access moderator tools
Badges
3 13 31
Newest
 Nice Answer
Impact
~255k people reached

  • 0 posts edited
  • 16 helpful flags
  • 1,010 votes cast
Aug
19
comment Mutable AST vs. different immutable ASTs
@DeadMG, there is no argument. It's just two different approaches, two cultures that don't even overlap. There's also a third, totally alien culture - attribute grammars.
Aug
18
comment Mutable AST vs. different immutable ASTs
Of course it depends on an approach. If you employ the nanopass approach I referred to, all your intermediate step will have a representable (S-expressions-based) syntax. It's just a different way of thinking about the compilation pipeline.
Aug
18
comment Mutable AST vs. different immutable ASTs
@DeadMG, intermediate languages got a syntax too.
Aug
18
comment Mutable AST vs. different immutable ASTs
You may find this approach interesting: andykeep.com/pubs/np-preprint.pdf - define as many slightly different immutable ASTs and IRs as you like, the more the better, and put stupidly trivial passes in between them.
Aug
6
awarded  Nice Answer
May
1
comment What is the minimum practical definition for the Scheme language?
If you want continuations it may become a bit more complicated.
Mar
30
comment Can we replace XML with JSON entirely?
@Andy of course I do. Just compare the functionality and flexibility of a full-blown Scheme vs. any of the XML tools, especially something as awful as xslt.
Feb
25
comment Programming languages with a Lisp-like syntax extension mechanism
@RenéG, because macros must be able to construct a valid AST and to transform an AST (i.e., be able to deconstruct macro arguments).
Jan
18
awarded  Yearling
Jan
11
comment Which components/phases of a JIT compiler are different from a traditional ahead of time compiler?
There are two big differences: JIT is severely time-constrained, so it cannot do things the way traditional backends do. But what the AOTs do not have, unlike JITs, is a very precise runtime profiling information, and the modern JITs use that a lot.
Dec
28
comment Is it difficult to develop a programming language which is closely related to human language?
If you count Lojban as a "human language", then it's not that difficult at all. Otherwise, the other human languages are a way too vague to be of any use as a formal system.
Dec
27
comment Why lambda/closures expressions came so late to C++?
@eldorado, closures were considered pretty worthless in mainstream ever since they failed miserably in Smalltalk. And now I'm pretty sure that LINQ forced closures into Java and C++, not anything else, because nothing else happened during this time frame.
Dec
24
comment Does the syntax of programming languages depend upon their implementation?
@Jack, you're trying to redefine what syntax is. There are no practical languages that need a Turing-complete parser, most are nothing more than context-free. And this is where the syntax should stay. Please do not extend this (already too stretched) notion anywhere else. And I already mentioned Curry-Howard isomorphism - it's all about semantics, far beyond the mere correctness rules. I think, the very term "type checking" is extremely counterproductive and should not be used, it is very misleading, it does not reflect the nature of the type systems.
Dec
23
comment How to use multiple programming languages together in the same program?
And it's actually the most common definition of what "scripting" is - a lightweight glue which binds together various smaller modules or standalone programs.
Dec
23
comment Why lambda/closures expressions came so late to C++?
@AgustinMeriles, probably not directly, but most certainly by shifting the public opinion. There is little doubt that it was specifically LINQ which lured the wider programming audience towards some bits of functional programming.
Dec
23
comment How to use multiple programming languages together in the same program?
@DocBrown, I'm totally serious. What made you think I'm joking? I do not know a single case where using domain specific languages won't provide a significant performance boost.
Dec
23
comment Why lambda/closures expressions came so late to C++?
Closures are hard to get right in a language without fully managed memory. You have to specify all the nasty nuances of ownership, lifetime, copying, etc. Closures in C++ are much, much more complicated than closures in Lisp or JavaScript. And it was not quite clear up until recently that closures are of any use for a typical enterprisey coding, not until LINQ changed the prevailing perception.
Dec
23
comment How to use multiple programming languages together in the same program?
1) There is no such thing as a "scripting language". Scripting is nothing but a mode of use of a language, and you can do scripting with pretty much any powerful enough language. 2) One must use dozens of different languages within a single project, it's the most efficient way of doing things. When it's not possible, then at least using two, three or more is always an option.
Dec
23
comment Does the syntax of programming languages depend upon their implementation?
@Jack, type system does much more than simply checking if types are correct. Even in primitive languages like C, typing injects some heavy semantics (implicit type conversions, for example), in more elaborate languages, like C++, you can practically program in type system alone (and there is a lot of other Turing-complete type systems). Think of Curry-Howard isomorphism - this is something well beyond the scope of anything "syntax". And, yes, what is called "syntax transforms" in Scheme has nothing to do with syntax, it's a very misplaced term.
Dec
23
comment Does the syntax of programming languages depend upon their implementation?
@Jack, syntax only rules which character sequences are acceptable as a valid program, but it does not cover any other validity constraints, most certainly not the typing. And type systems are much more than validity constraints, they've got semantic meaning, not just filtering out incorrect code.