Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bjz_
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
34 ms
·
181.
▲
by
bjz_
9y ago
For the short term and mid term yes. However I do hope that in the long term the ideas from ATS, Liquid Haskell, Idris, F*, etc. will be iterated on in order to make them more accessible and usable. In the mean time we'll probably star
182.
▲
by
bjz_
9y ago
Trouble is that in C there is no way to encapsulate the unsafe code. Rust has tools that let you do that - it's not perfect, but depending on the level you are working at you can even build operating systems like Redox with the majorit
183.
▲
by
bjz_
9y ago
Great question. There's and FAQ on that: https://www.rust-lang.org/en-US/faq.html#why-do-rust-program... - tl;dr is that it is by default but you can slim it down to the same size as a C executable if you need to.
184.
▲
by
bjz_
9y ago
Servo, Firefox, Redox-OS, libsvg, Linker-d, GNOME, Maidsafe, pieces of Fuchsia... it's a huge effort, but it's beginning to pick up steam. I'm certainly trying to play my part as well (still private, but will be OSS).
185.
▲
by
bjz_
9y ago
> I hope it's not Rust, because Rust is even more complicated than C++. Erm, have you ever used Rust, and had much experience with C++? Rust's semantics are far clearer, simpler, and well defined than C++'s, and there are
186.
▲
by
bjz_
9y ago
C's semantics are far from simple.
187.
▲
by
bjz_
9y ago
You can actually do a huge amount of metaprogramming in dependent type systems and still have the the power of static checking. We're still figuring out how to improve the ergonomics to the level that it matches macros and other code-g
188.
▲
by
bjz_
9y ago
Oh wait, I misread the comment you were responding to. Oops!
189.
▲
by
bjz_
9y ago
Yeah, I've noticed that Go APIs are very stringly typed. The APIs are not very self documenting, and it is hard to figure out whether something is nullable or not. Libraries often require you to initialised data in a partially invalid
190.
▲
by
bjz_
9y ago
Check out Dafny, Whiley, and Liquid Haskell.
191.
▲
by
bjz_
9y ago
Yes! If your language allows you to put constraints on those types you can specify what specific types have access to. For example in Rust: fn foo<T: Positioned>(x: &T) -> Point { x.position() } Note that th
192.
▲
by
bjz_
9y ago
A good static type system will give you the ability to be able to control the level of dynamism in various parts of you code. For example you could create tagged unions to create mini dynamic type systems within parts of your codebase.
193.
▲
by
bjz_
9y ago
Great to see Bloom and Lasp mentioned! https://github.com/heathermiller/dist-prog-book/blob/master/...
194.
▲
by
bjz_
9y ago
Null is not really the most pertinent example in this context - at least you get a segfault. What is more important is that in C or C++ (even C++17), it is trivially easy to produce buffer overruns, use after frees, dangling pointers, inval
195.
▲
by
bjz_
9y ago
In C and C++ you have to treat everything as unsafe, because you have neither a GC nor a compiler to help tell you when you have accidentally violated some memory management invariant that some API was depending on. Rust's type system
196.
▲
by
bjz_
9y ago
How does it handle heterogeneous clusters that might have different versions of code running? Or is it like Cloud Haskell where you have to bring everything down when deploying?
197.
▲
by
bjz_
9y ago
I would love to see some advancements into distributed, statically typed languages that can be run on across cluster, and that would support type-safe, rolling deployments. One would have to ensure that state could be migrated safely, and t
198.
▲
by
bjz_
9y ago
The question he is answering is: "After memory safety, what do you think is the next big step for compiled languages to take?" It might be that he thinks it has successfully pushed the state of the art in terms of regions
199.
▲
by
bjz_
9y ago
Scala maybe, but it has its share of problems, alas. On a purely features level I'd definitely be looking for something with null safety, disjoint unions, pattern matchin with exhaustiveness checking, local type inference, and parametr
200.
▲
by
bjz_
9y ago
In my frustration while writing my comment I'll admit I was a bit weaselly there and didn't really cite anything. The Akka.Typed[1] project is working on type-safe actors, but looking at it again I'm not sure how or if they c
201.
▲
by
bjz_
9y ago
I'm a bit biased in my development perspective and a bit jaded with the state of back-end development, but here goes: I've done a decent amount of Elixir in prod over the last year and a bit and I've found the lack of a decen
202.
▲
by
bjz_
9y ago
Errm.... I work with the guy and he's been paid to write code in it for the last year now.
203.
▲
by
bjz_
9y ago
> I'm not sure why people talk about Rust being safe when this sort of thing happens and it can't catch it at compile time. "Safe" as in "memory safe". Panicking is better than allowing one to read into that
204.
▲
by
bjz_
9y ago
Yeah, using a tuple for what clearly should be a disjoint union is infuriating. I really don't buy the gopher argument that 'it is hard to understand'.
205.
▲
by
bjz_
9y ago
> Haskell's type system isn't yet powerful enough to do what I want. What still needs to be done? Does Idris have enough of the power that you need?
206.
▲
by
bjz_
9y ago
Not having a decent type system (dialyzer is slow and does not have parametric and bounded polymorphism) is a massive strike against Elixir.
207.
▲
by
bjz_
10y ago
I was actually going to use `lazy_static!` for this! Good to see a nicer solution is now here. :)
208.
▲
by
bjz_
10y ago
I like failing fast in the exceptional case where things are out of my control, and OTP is a great platform for doing so, but most of the crashes I get in Erlang/Elixir are purely programmer error, and would be trivial to catch statica
209.
▲
by
bjz_
10y ago
> stack traces are clean, readable, and point you in the right direction most times I really have not found this to be the case. You'll get obscure unmatched function clause errors coming from the opposite side of your program, that
210.
▲
by
bjz_
10y ago
http://whiley.org/ is another similar language that uses an SMT solver for testing program invariants.
More ›