Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Malcolm XML
Aug 8, 2009

I always knew it would end like this.

MALE SHOEGAZE posted:

I mean, I guess it comes down to whether a hello world implementation is meant to demonstrate idiomatic code or whether it's meant to give insight into how the language operates. The macro completely obfuscates whatever is going on there and as far as I know, it could be hiding java levels of boilerplate (which would be fine or even cool).

it would require a stronger type system to have a function like printf with variable arguments and be fully type checked


fully type safe printf is like the hello-world of dependent types, maybe 2nd to length indexed lists

Adbot
ADBOT LOVES YOU

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
Hell yeah hkt will come so we don't need these ad-hoc monads cluttering up the language

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

taqueso posted:

It is really good at "if it compiles it works" assuming you have the right logic.

Not really. The rust type system is not that powerful modulo the borrow checker. Maybe with actual dependent types (cost generics and generalizations thereof) you could express more useful logic in types.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Ralith posted:

You can express all kinds of useful logic in Rust types for all that they don't gracefully embed arbitrary constructive propositions. Const generics are also very much not "actual" dependent types: the meat of those is the ability for a type to depend on a statically unknown, i.e. non cost, value.


Better than nothing and it beats standard Haskell.

That said a type system that’s too weak to express basic stuff like state machines isn’t all that useful, just an impediment. If illegal states aren’t unrepresentative there’s little point. Did higher kinded types ever get implemented?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply