←back to thread

11 points Hashex129542 | 1 comments | | HN request time: 0.219s | source

I'm developing a programming language, the keywords and features mostly based on Swift 5 but some additional features like,

1. async function will be called from no async function but no async/await keyword. If you want to block main thread then block_main() function will be used. block_main() /* operations */ unblock_main()

2. protocol can inherit another protocol(s) & protocol can confirm a class like swift.

3. no `let`. only `var`. compiler can optimize further.

4. if (a == (10 || 20 || 30) || b == a) && c { }

5. `Asterisk` is replaced to `x` operator for mul operations.

What are the features you found or you need in a programming language?

1. sargstuff ◴[] No.42200540[source]
Language support protocol for ide/editor (aka pigments[1]/treesitter[2] bnf for emacs, neovim, zed, etc)

Because of the similarity to swift language, perhaps hazel[3] option to highlight differences between standard swift & swift-like language.

-----

[1] Pygments, generic syntax highligher : https://news.ycombinator.com/item?id=41324901

[2] Treesitter : https://news.ycombinator.com/item?id=39408195 / https://github.com/mingodad/plgh

[3] : Hazel: A live functional programming environment featuring typed holes : https://news.ycombinator.com/item?id=42004133 ~