Reputation
1,512
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
7 19
Impact
~24k people reached

  • 0 posts edited
  • 0 helpful flags
  • 169 votes cast
Apr
13
accepted What do language designers do to decide or prove that a particular feature works correctly?
Apr
6
revised Why is there a new() constraint in C# but no other similar constraint?
added 14 characters in body
Apr
6
revised Why is there a new() constraint in C# but no other similar constraint?
Restored a paragraph I deleted earlier.
Apr
6
revised Why is there a new() constraint in C# but no other similar constraint?
deleted 240 characters in body
Apr
4
comment Can a programming language by design enforce “clean code”?
What characteristics does "clean code" have for the purposes of this question? You need to define that, otherwise any answer with any justification could be valid.
Mar
23
awarded  Nice Question
Mar
18
revised What do language designers do to decide or prove that a particular feature works correctly?
added 2 characters in body
Mar
18
comment What do language designers do to decide or prove that a particular feature works correctly?
@StevieV I know about lexical analysis, but it's not quite what I'm concerned about here. If I may talk about Rust again, as an example: the ownership system with the rules for immutable and mutable borrows and lifetime annotations is something that has pretty much nothing to do with the syntax of the language, and it's probably not something that requires a complex compiler either. At its core, it's just a very clever set of rules and my question is how did they fully prove that this clever set of rules would do its job before they said "now let's put all of that in the compiler"?
Mar
18
revised What do language designers do to decide or prove that a particular feature works correctly?
added 17 characters in body
Mar
18
comment What do language designers do to decide or prove that a particular feature works correctly?
@StevieV I mean a person who decides what goes into a language and what's left out, what the semantics of various operations are, what promises are made to the user of the language, and so on. That person may or may not be involved in the construction of the compiler (though I personally would usually expect them to at least be involved and even be able to create a prototype compiler, but it's all optional).
Mar
18
asked What do language designers do to decide or prove that a particular feature works correctly?
Mar
8
comment Is it possible to statically predict when to deallocate memory---from source code only?
This isn't possible to do in the general case. Rust takes an interesting path though, because it forbids a lot of things that are legal in other languages (e.g. C, C++, C#, Java) and it appends more compile-time information (e.g. lifetimes as generic arguments). By doing these, instead of having to solve the lifetime problem for the general case, Rust forces you to express everything through a few specific special cases that have well known incoming and outgoing requirements to the compiler. (Which I think is a good direction for languages that want no tracing GC and no dangling pointers.)
Feb
19
awarded  Guru
Feb
19
awarded  Good Answer
Feb
19
revised Should I throw an exception in case of a meaningful value outside of the range or handle it myself?
added 56 characters in body
Feb
18
awarded  Mortarboard
Feb
18
revised Should I throw an exception in case of a meaningful value outside of the range or handle it myself?
added 3 characters in body
Feb
18
awarded  Enlightened
Feb
18
revised Should I throw an exception in case of a meaningful value outside of the range or handle it myself?
added 37 characters in body
Feb
18
comment Should I throw an exception in case of a meaningful value outside of the range or handle it myself?
@supercat I tend to agree with you, but since I don't know which values are actually invalid in the Web Mercator specification, I'm trying not to draw any hard conclusions. The OP knows the problem domain better than I do.