Live data from Hacker News

The Senegal Programming Language

github.com

1–10 of 80 posts

Re: The Senegal Programming Language

#4
post #3

Why?

I have the same question. The documentation does a good job presenting the language, but not the motive or sweet spot use case.

From the guidelines[0]:

> Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something.

[0] https://news.ycombinator.com/newsguidelines.html

Re: The Senegal Programming Language

#5
post #3

Earlier quoted context omitted.

I have the same question. The documentation does a good job presenting the language, but not the motive or sweet spot use case.

From the guidelines[0]: > Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something. [0] https://news.ycombinator.com/newsguidelines.html

No, it is actually good feedback. Any project should have a good background page why they sre being build, by who and with what expertise.

Re: The Senegal Programming Language

#6
As always, all languages, especially the new one, should have a "why" section. Small caveat: maybe it's still under construction and the person that posted it just found it too early. But once you're ready to show it to the world, please include the why! Note that anything is valid in the "why", even "just for fun" or "because I could". For now there is:

> Senegal is a powerful, small-but-fast, concurrent, class-based, and dynamically-typed programming language with a modern syntax.

I think the closest thing to it is Wren? https://wren.io/. The difference being that Senegal is compiled and Wren is interpreted.

A few things of interest:

- there are exceptions

- you can call some C code: https://lang-senegal.web.app/docs/cimport

- you can "enhance" (monkey patch?) classes: https://lang-senegal.web.app/docs/enhance

- classic C-style for, while, switch keywords

- there's a pipeline operator, but it's https://lang-senegal.web.app/docs/pipeline

- the reference to "switch statements" probably means that switch and if are statements, not expressions

Re: The Senegal Programming Language

#7
post #3

Why?

I have the same question. The documentation does a good job presenting the language, but not the motive or sweet spot use case.

There's a Discord where you can probably get the answer to your question: https://discord.gg/9dq6YB2

Re: The Senegal Programming Language

#8
I'm not sure I'm a fan of the 'Enhance' concept[0]. It seems to be similar to prototype Pollution in JavaScript[1] which is generally considered bad practice. I can't tell, is `Enhance` scoped to the current context? Or does it affect all of that type throughout the rest of the program?

[0] https://lang-senegal.web.app/docs/enhance [1] https://portswigger.net/daily-swig/prototype-pollution-the-d...

Re: The Senegal Programming Language

#9
post #6

As always, all languages, especially the new one, should have a "why" section. Small caveat: maybe it's still under construction and the person that posted it just found it too early. But once you're ready to show it to the world, please include the why! Note that anything is valid in the "why", even "just for fun" or "because I could". For now there is: > Senegal is a powerful, small-but-fast, concurrent, class-base…

Support for Windows, MacOS, and Linux is also a plus.

Re: The Senegal Programming Language

#10

I'm not sure I'm a fan of the 'Enhance' concept[0]. It seems to be similar to prototype Pollution in JavaScript[1] which is generally considered bad practice. I can't tell, is `Enhance` scoped to the current context? Or does it affect all of that type throughout the rest of the program? [0] https://lang-senegal.web.app/docs/enhance [1] https://portswigger.net/daily-swig/prototype-pollution-the-d...

The "enhance" seem to be monkey patching, which is a common practice in dynamic languages. Prototype pollution is when malicious people use monkey patching to introduce vulnerabilities.
Post reply on HN