r/AskComputerScience • • 6d ago

Domain languages /native speed

I know well the trade off between domain languages / efficiency compared with c / assembler

CPU / memory are fast enough for good enough performance but with memory supply issues I wondered if direction were going to be able develop better domain languages to break trade off.

modern compilation - reflection - macros - templates

languages like c should only be written by experts and or machines imo way too risky for domain users.

Eg in audio domain I want to write code fast enough for realtime have it expanded to low level code - using linked list/stack/heap/hash/midi etc

Instrument a as piano :
a.octave = + 2
a.root = g
a.feel = shuffle
a.scale = enigma
a.play(100)

I don’t want to manage memory / lifetime or use library
Ie I want the compiler to do the translation?

Is this reasonable or am I dreaming ? Do you think we need stronger reflection ie I probably need to work with ast at the moment.

0 Upvotes

11 comments sorted by

View all comments

1

u/braaaaaaainworms 6d ago

Stop worrying about performance if you don't have concrete performance goals that you need to hit. Rust will be fine if you cooperate with the borrow checker

1

u/nelson_fretty 6d ago

Need to rewind - I have 64gb but most folks only have 4/8gb

1

u/braaaaaaainworms 5d ago

There probably aren't going to be enough people using your software to worry about it right now