Live data from Hacker News

Lemon – An embeddable, lightweight programming language in ANSI C

github.com

31–40 of 71 posts

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

#32

I'm seeing in the source that the author prefers type methodName(args...) Is this a common C-ism? I'm not familiar with this code style.

It is. It allows to search for function declarations with the regex '^[^( ]+[(]' (or similar) -- while more common in the past, many have adopted it and keep using it.

Personally I've come to find it nice to read, particularly when you're returning complex, long types.

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

#35
post #28

Earlier quoted context omitted.

I’m mostly seeing a lot of Python. The examples show that multiple assignment unpacks collections, functions can be called with argument name assignment, and collections can be unpacked into named arguments, as opposed to using collections to replace named arguments.

Ruby supports that too. Here's a snippet that shows named arguments, and unpacking a Hash into named arguments. It can do multiple assignment and unpacking collections into them too, though unlike with named arguments, that will treat the collection as an Array: def foo bar:, baz: p [bar, baz] end h = {bar: 1, baz: 2} foo(h)

[deleted]

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

#36

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?

Developer: Read the source code!

I've seriously seen this kind of response from developers while looking for help using melt (Media Lovin' Toolkit). You typically see this kind of response for better documentation: "melt is for developers. Use one of the GUI front ends to generate a script for you or read the source code."

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

#39

I'm seeing in the source that the author prefers type methodName(args...) Is this a common C-ism? I'm not familiar with this code style.

GNU style. https://en.m.wikipedia.org/wiki/GNU_coding_standards

GNU style is mostly about the funny and ugly indentation of braces.

Return type on separate line is shared by many other coding styles.

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

#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

Post reply on HN