5 ms·
How is this low level exactly?
by markoutso 4y ago
How is this low level exactly?
- roelschroeven 4y agoIt's not, or only partially. "To try to bridge the gap between high and low level languages, ante adapts a high-level approach by default, maintaining the ability to drop into low-level code when needed." says the website.
- jfecher 4y agoAuthor here, to me the lack of a pervasive tracing GC and values not being boxed by default are important for low level languages. That and maintaining the ability to drop down and use low level constructs like raw pointers for optimization or primitives for new abstractions are essential.
- maze-le 4y agoPointers and manual memory management apparently.
- shirogane86x 4y agoquoting the github readme: > In general, ante is low-level (no GC, values aren't boxed by default) while also trying to be as readable as possible by encouraging high-level approaches that can be optimized with low-level details later on.
- whoomp12342 4y agowith no GC, is there compile time segfault checking like rust?
- jfecher 4y agoAuthor here, that is the purpose lifetime inference is meant to serve. It automatically extends lifetimes of `ref`s so that they are long enough. A key advantage of these is avoiding lifetime annotations in code, at the cost of some lack of control since the lifetime is increasingly handled for you. You can also opt out by using raw pointer types though and easily segfault with those.
- whoomp12342 4y agolow is relative :-D my thought exactly. IMO the only low level language is assembly. Everything else is some form of abstraction. C/C++ and the likes I tend to call lower, since in 2022 it is closer to the hardware, and then sugar languages like python, c#, js, and the likes I call high level.
- wtetzner 4y agoEven assembly languages are abstractions.
- astrange 4y agoStrangely the language "below" assembly, Verilog, is a lot more abstract and tries to pretend to look like C while generating hardware, so writing it is more like imagining how to trick it into doing what you want.
- ithkuil 4y agoThat's because a HDL is not a lower level machine language, but instead they are languages used to implement a machine that consumes a machine language. Consider what happens when you implement a x86 emulator in python: you're using a high level language to implement a machine using a particular substrate (a simulation inside another machine). This simulated x86 CPU executed machine code and you'd call that machine code to be the "native" or "lowest level" language with respect to that particular machine. You can see how that choice of machine language bears no relationship with the language used to implement the underlying machine.
- astrange 4y agoIt's not because of anything intentional, it's because Verilog is poorly designed. https://danluu.com/why-hardware-development-is-hard/ https://danluu.com/why-hardware-development-is-hard/ https://danluu.com/pl-troll/ https://danluu.com/pl-troll/