graydon2: (Default)
[personal profile] graydon2
Well-known things I'm very proud that rust shipped 1.0 without:


  • null pointers
  • array overruns
  • data races
  • wild pointers
  • uninitialized, yet addressable memory
  • unions that allow access to the wrong field


Less-well-known things I'm very proud that rust shipped 1.0 without:


  • a shared root namespace
  • variables with runtime "before main" static initialization (the .ctors section)
  • a compilation model that relies on textual inclusion (#include) or textual elision (#ifdef)
  • a compilation model that relies on the order of declarations (possible caveat: macros)
  • accidental identifier capture in macros
  • random-access strings
  • UTF-16 or UCS-2 support anywhere outside windows API compatibility routines
  • signed character types
  • (hah! vertical tab escapes (as recently discussed) along with the escapes for bell and form-feed)
  • "accidental octal" from leading zeroes
  • goto (not even as a reserved word)
  • dangling else (or misgrouped control structure bodies of any sort)
  • case fallthrough
  • a == operator you can easily typo as = and still compile
  • a === operator, or any set of easily-confused equality operators
  • silent coercions between boolean and anything else
  • silent coercions between enums and integers
  • silent arithmetic coercions, promotions
  • implementation-dependent sign for the result of % with negative dividend
  • bitwise operators with lower precedence than comparison operators
  • auto-increment operators
  • a poor-quality default hash function
  • pointer-heavy default containers


Next time you're in a conversation about language design and someone sighs, shakes their head and tells you that sad legacy design choices are just the burden of the past and we're helpless to avoid repeating them, try to remember that this is not so.

Date: 2015-09-27 02:06 pm (UTC)
squirrelitude: (Default)
From: [personal profile] squirrelitude
It all sounds so wonderful! :-D

...what's wrong with random-access strings? Unless I'm thinking of something else.

Date: 2015-10-01 02:35 am (UTC)
squirrelitude: (Default)
From: [personal profile] squirrelitude
Interesting... right, for string blitting operations I want UTF-8, and for string manipulation I (because of what I work on) want char arrays. The latter is more visible, but the former is perhaps the more important case for performance, depending on what you're doing. Certainly if I were doing linguistics work, UTF-8 would be just fine.

I imagine this was a rather controversial one. :-P

June 2018

S M T W T F S
     12
3456789
10111213141516
171819202122 23
24252627282930

Most Popular Tags

Page Summary

Active Entries

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 29th, 2018 01:11 am
Powered by Dreamwidth Studios