News for hackers. Stuff that matters.
Re:L++ Language by BruceIV on Wednesday May 07, 2014 @02:30PM (#7711878)
Usually I love looking through new programming languages, but the docs here don't give me any motivation for the language, or even any reasonably non-trivial examples. Is it just supposed to be C++ with Lots of Irritating Silly Parens?
Re:L++ Language by cjensen on Wednesday May 07, 2014 @03:02PM (#7712058)
Silly Parens are easier to parse. Automated manipulation of programs might be fairly easy to accomplish.

If there were Lisp-style Macros available, that would beat the pants off the C Preprocessor for boilerplate.

Re:L++ Language by ktg on Friday May 09, 2014 @10:23AM (#7720987)
v0.2: Macros are supported via Racket's macro system define-syntax.
Re:L++ Language by NAFV_P on Wednesday May 07, 2014 @04:19PM (#7712419)
> Silly Parens are easier to parse.

I thought silly parentheses are just as easy to parse as in an imperative language like C. Are you referring to the Polish prefix form being easy to parse?

Re:L++ Language by loumf on Wednesday May 07, 2014 @04:24PM (#7712448)
It's more like, the text is easier to turn into an AST, and it's easier to manipulate that AST. It's not so much the parens, but the nested structure (and that all of the code is in that structure)
Re:L++ Language by NAFV_P on Wednesday May 07, 2014 @04:30PM (#7712476)
> It's not so much the parens, but the nested structure (and that all of the code is in that structure)

I should have explained myself more clearly, I thought that the operator appearing at the beginning of the list means that operator precedence is no longer relevant. With infix operators the precedence is important.

Re:L++ Language by aerique on Thursday May 08, 2014 @03:55AM (#7714340)
Yes, this is also correct. In most (if not all) Lisps the generic structure is "(operator [arg1] [arg2] [...] [argn])".
Re:L++ Language by Crito on Thursday May 08, 2014 @12:48PM (#7716236)
Infix languages are trivial to parse; undergrad CS students typically do it the same week that they learn about parsing prefix and postfix languages.

What actually makes lisps easy to parse is a near complete absence of syntax; particularly structures/constructs that require considerable effort to disambiguate.

Re:L++ Language by endeavour on Wednesday May 07, 2014 @07:43PM (#7713231)
Who cares how hard a language is to parse if a parser exists?
Re:L++ Language by CodeMage on Wednesday May 07, 2014 @08:25PM (#7713349)
What he was trying to explain is called homoiconicity:

http://en.wikipedia.org/wiki/Homoiconicity

Re:L++ Language by clem on Wednesday May 07, 2014 @10:42PM (#7713699)
Really the best album The Police produced.
Re:L++ Language by S4M on Wednesday May 07, 2014 @02:59PM (#7712032)
I had a brief look at the solutions of the problems from Project Euler in L++ [0]. As you say, it seems like C++ with the LISP syntax. On the other hand, it can be a LISP where you can trivially import some C++ libraries (as in the source code: (include "iostream" "vector") ). But since I couldn't find macros and eval in the docs, I would err on the side of C++ with the Silly Parens for now...

[0]: https://bitbucket.org/ktg/l/src/cb93b589c03ec1e39007c1907deb...

Re:L++ Language by pmelendez on Wednesday May 07, 2014 @03:02PM (#7712051)
A Lisp dialect that compiles to C++ is interesting. I am not sure if features like Lisp macros would be provided, but still you can compare the versions of 99 bottles of Beer and see a significant difference: http://www.99-bottles-of-beer.net/language-c++-111.html

I find the L++ version to be very way more elegant.

Edit: More examples... https://bitbucket.org/ktg/l/src/cb93b589c03ec1e39007c1907deb...

Re:L++ Language by jeorgun on Wednesday May 07, 2014 @04:44PM (#7712551)
Well, yeah, an actual example of realistic code is going to be more elegant than something that's literally self-parody.

  int main()
  {
    for (int i = 99; i--;) {
      std::cout << i << " bottles of beer on the wall, " << i << " bottles of beer.\n"
                << "Take one down, pass it around, " << i << " bottle of beer on the wall.";
    }
  }
is basically the same thing as the L++ version, with a few added bitshift operators.
Re:L++ Language by jordigh on Wednesday May 07, 2014 @03:03PM (#7712062)
It is indeed just C++ with lisp syntax. Talk about cargo culting.
Re:L++ Language by pmelendez on Wednesday May 07, 2014 @03:09PM (#7712092)
It compiles to C++ but I wouldn't say that is C++ with a Lisp syntax. Just in the same way that CoffeeScript is not Javascript.

In fact it uses Racket behind the scenes which might open the door to use regular Lisp features.

Re:L++ Language by jnbiche on Wednesday May 07, 2014 @03:30PM (#7712188)
Jeremy Ashkenas, creator of CoffeeScript:

"The golden rule of CoffeeScript is: 'It's just JavaScript'"