←back to thread

12 points Hashex129542 | 1 comments | | HN request time: 0.48s | 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?

Show context
ecesena ◴[] No.42201079[source]
Instead of going up in abstraction, I think it’d be nice to have a lang that tries to go down, more coherent with the hw, without “historical” assumptions.

My pet peeve is multiplication: u64*u64=u128. true on any modern hw, true in math, false in any programming lang that I know of. There are many others like unnecessary assumptions on how easy is to access memory.

Vector and matrix ix should be another first class citizen.

The reason for a lang vs just writing in asm are 1) I don’t want to distinguish x86 vs arm, 2) I want a compiler + optimizer.

replies(1): >>42201277 #
1. Hashex129542 ◴[] No.42201277[source]
Nice. I am not sure we need 128bit data types. I think 64bit is enough for now. Matrix collection is really essential. We'll discuss about it. So we might ignore Multi dimensional array complexity.