Earlier quoted context omitted.
As far as i can see it is simple, everything can return an Error, so you have to check the return value if it is an error. https://github.com/Beariish/bolt/blob/main/examples/error_ha...
That's definitely not universally true, with even the core library getting into the "null indicates error" game https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand... or this fun middle ground where it could be Error or null https://github.com/Beariish/bolt/blob/0.1.0/doc/Bolt%20Stand... But I think OP was asking about whatever the hell this means by "native error callback" https://github.com/Beariish/bolt/b…
Show HN: Bolt – A super-fast, statically-typed scripting language written in C
91–98 of 98 posts
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#92I love the concept -- I've often wished that lean languages like Lua had more support for static typing, especially given the potential performance benefits. I also love the focus on performance. I'm curious if you've considered using a tail call design for the interpreter. I've found this to be the best way to get good code out of the compiler: https://blog.reverberate.org/2021/04/21/musttail-efficient-i... Unfortun…
You may be interested in Luau, which is the gradually-typed dialect of Lua maintained by Roblox. The game Alan Wake 2 also used it for level scripting.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#93I like 99% of this, and the thing I don't like is in the very first line of the example: > import abs, epsilon from math IMHO it's wrong to put the imported symbols first, because the same symbol could come from two different libraries and mean different things. So the library name is pretty important, and putting it last (and burying it after a potentially long list of imported symbols) just feels wrong. I get that…
According to the Programming Guide, it supports aliases for imports "In case of conflict or convenience, you can give modules an alias as well."
Let's say I have two modules, "telnet" and "ssh", and both have a "connect" function. When I read "import connect, (long list of other imports here)" I don't know which connect it is, and I might form the wrong mental connection, which I then have to revise when I start to read the module name.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#94Looks great, I'm especially a fan of the more C and Python syntax. Lua works, but its syntax has always been bugging me. On the feature side, is there any support for breakpoints or a debugging server, and if not is it planned?
There's nothing like that right now, but it's absolutely something I want to explore in the future.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#95I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.
so it seems to me you're hung up on the current limitations of the language server, which is an implementation detail.
if what you want is actually important, the syntax should have been `import yyy.xxx as xxx` or similar, with optional `as xxx`, instead of a Cobol inspired syntax detail to remember.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#96Wow a fast scripting language with normal syntax and type checking.. Really hope this can take off and be a valid Lua alternative.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#97I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.
This cannot be a reasonable factor in lang selection.
Re: Show HN: Bolt – A super-fast, statically-typed scripting language written in C
#98I don't understand why people still choose the syntax `import xxx from yyy` in the current year. It is a major source of complaining for languages like python or javascript, because it makes autocomplete does not work well. make me instantly lost interest in the language.
Two potential suggestions: 1. Ask - the author is very much available, right here in this comment section they made specifically for such a prospect. 2. Contribute - Code the change you wish to see in the world. Follow the OP’s example, and do something about it.
The point is pretty simple, if the author is too lazy to do some basic research about this common problem, he is probably too lazy to do other important stuff, too.
Time is short, there is always new languages out there to test.