C# style suggests using CamelCase in identifiers to delimit words. Lisp tradition suggests using-dashes-instead.
Has there ever existed a programming language where using spaces in identifiers was not only allowed, but a commonly used idiom when employing multi-word identifiers?
It's possible to have identifiers with spaces in some Scheme implementations, but it's not a widely seen practice. Here's an example:
Petite Chez Scheme Version 8.4
Copyright (c) 1985-2011 Cadence Research Systems
> (define |hey there| 100)
> (define |x y z| 200)
> (list |hey there| |x y z|)
(100 200)
bobs_utilities :: string_functions :: scramble
. This is a name, and we can include arbitrary whitespace if we want because it is syntax, an not a simple token. Names with multiple components want to be abstract syntax; shoehorning namespace info into a single identifier is basically a "name mangling" hack for representing structure inside text where you are lacking the mechanism to represent the structure. – Kaz Apr 24 '12 at 18:25alert({'some Prop':'bob'}['some Prop']);
but if those string property names fail the identifier/label test you can't use them with dot notation. – Erik Reppen Jun 15 '13 at 6:08define_singleton_method "sjdlkfjsljk#$SDEF SDFSDF@# @#$!!~" do; puts 42; end;
and then you can:send "sjdlkfjsljk#$SDEF SDFSDF@# @#$!!~"
but it is not common. – Darek Nędza Apr 4 '14 at 8:15