Viewing profile — ntrel
ntrel
HN member- Joined
- Fri, Jul 20, 2012, 2:00 PM UTC
- HN karma
- 11
- Public activity
- 19 items
- HN profile
- View on Hacker News ↗
About ntrel
No profile information was provided.
Recent public activity
-
comment
Comment #49109085
OK (I saw this but forgot), found: https://dpldocs.info/this-week-in-arsd/Blog.Posted_2025_09_2...
-
comment
Comment #49096453
> the two bigger things I did they have talked about but probably won't do is i made the class monitor opt-in https://dlang.org/changelog/pending.html#dmd.monitor-field
-
comment
Comment #45096735
My understanding is that RC is relatively expensive in time (especially for atomic RC) but uses a lot less memory than state of the art fast GC. And RC doesn't handle cycles.
-
comment
Comment #34104520
D doesn't store capacity in each slice. This allows a slice to fit in registers more often. Instead for GC allocated slices, the GC will store metadata before the first element of …
-
comment
Comment #34104461
Because Go designers don't like OOP and didn't want low-level system programming as core features. They also were not keen on generic programming. Basically they wanted a simpler l…
-
comment
Comment #34104381
This compiles: ref ubyte[n*2] requires_ptr_twice_as_large_as_input(uint n) ( const ref ubyte[n] input, ref ubyte[n*2] output, ) { output[0..n] = input[0..n]; output[n..2*n] = input…
-
comment
Comment #31907587
Why is your proposal better than this: import std.sumtype; void main(){ struct A { int a; } struct B { string b; } struct C { bool c; } alias TaggedUnion = SumType!(A, B, C); auto …
-
comment
Comment #31907290
Class instances can go on the stack too using `scope`: scope obj = new Object; ... // destroyed at end of scope
- comment
-
comment
Comment #4355659
Arrays and slices really have nothing to do with generic programming. Java has poor generic support (type erasure) and C++ has poor syntax and a bad design for iterators. Languages…
-
comment
Comment #4325519
Lack of generics does not ease development speed. Generic programming is about safe reusability. (Development speed includes the test, debug, fix cycle). No generics actually harms…
-
comment
Comment #4305324
C's preprocessor means C code can often do interesting tricks, such as the X macro: http://www.drdobbs.com/the-new-c-x-macros/184401387 There are tons of other interesting uses for…
-
comment
Comment #4305269
None of those things cause as much greenhouse gas emissions as a high meat diet. The level of meat consumption in rich countries is unjustifiable.
-
comment
Comment #4302068
> C++ has the best (imperative) language support for templates D's template support is far superior: static if, constraints, compile-time function execution, string mixins, opDispa…
-
comment
Comment #4302008
Actually it is simple: eat less meat. Meat production is vastly more wasteful than vegetable production calorie-for-calorie.
- comment
-
comment
Comment #4286181
The problem is it's no better than C - the correct way is to return sum types, either values or errors. A good language would statically check that any returned values are only use…
-
comment
Comment #4271744
> D's garbage collection is global, and either off or on That makes it sound like you can't use GC and manual memory management together; you can - std.container uses manual memory…
-
comment
Comment #4270859
> things that were mutable are still mutable `string` is immutable. You can use immutable everywhere if you like. C++ doesn't even have transitive const. > templates are still temp…