Live data from Hacker News

Lemon – An embeddable, lightweight programming language in ANSI C

github.com

51–60 of 71 posts

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#53
post #24

Why is the `var` keyword required in function arguments if it's dynamically typed and there's no other possible option?

This is a complete guess, but maybe so they can treat it the same way as normal variable declarations

Might be. Probably reusing the same pattern matching code in function definitions.

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#54
post #40
post #27

The documentation [1] appears to come from a very ordered mind. There's something very appealing about simplicity. I see more similarity with Python than either Java or C, except for the braces and semicolons. The description says that everything is an object, even types, though there's no way to specify types in the function prototypes so far, it seems. (Whilst that is what you would expect from a dynamically typed…

> So I guess this is all at a very early stage of development. That should be the top link

Submitters here have developed a truly odd habit of posting a github link when a project has a site with actual documentation. And then, we get random, angry posters (visible elsewhere on this page) who don't notice the link to the actual site at the top of the github page.

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#55

Earlier quoted context omitted.

> Why would anybody use a programming language with zero documentation for anything? Why would you write documentation if your language implementation is still rapidly evolving?

Regardless, shouldn't you at least write documentation to isolate and identify confusing points of your rapidly evolving language? It's almost a matter of good practices; explaining something is usually the best way to learn it.

It depends. The language's author probably didn't post this, so who knows what stage of development his project is at.

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#56

What problem does it solve?

   2, What problems are you trying to solve?
   A: 1, easily integrate with C. 2, stable and modern syntax. that's all I wanted.
I have asked a few more questions about the language:

https://github.com/lemon-lang/lemon/issues/6

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#58
post #24

Why is the `var` keyword required in function arguments if it's dynamically typed and there's no other possible option?

So you don't create variables when you typo a variable name. Declarations are an error catching mechanism

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#59
post #41
post #30

Earlier quoted context omitted.

What's so squeaky clean about hiding a goto inside a macro?

I guess you're referring to this[1]. I'd actually call that usage svelte. The macro is undefined not far after it's use in the file, and makes the section it's in far more readable. [1] https://github.com/lemon-lang/lemon/blob/9a0b3dbc854532b31f7...

Why does it have the do-while(0)?

Re: Lemon – An embeddable, lightweight programming language in ANSI C

#60

Went to the doc directory and got this: TODO: Add Doc Could developers please stop doing that? These 'agile development' and 'release early and often' mantras have really gone overboard. Why would anybody use a programming language with zero documentation for anything? Are we supposed to guess the language and its features from a single five-line hello world program?

> Why would anybody use a programming language with zero documentation for anything? Why would you write documentation if your language implementation is still rapidly evolving?

You should write the documentation first. Otherwise what are you writing?
Post reply on HN