Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell camelCase

Name: Anonymous 2010-04-14 14:28

Haskell has support for function_names_with_underscores. Why the fuck do people use PIG DISGUSTING camelCase?

Name: Anonymous 2010-04-14 14:32

Underscore_is_pig_disgusting_as_well.-Hyphens-can-be-nice,-but-a-real-language-would-support-symbols containing spaces.

Name: Anonymous 2010-04-14 14:44

>>2
So.... Inform 7?

Name: Anonymous 2010-04-14 14:48

Like this?

PHP: ${"this is a variable"} = 5;
Python: locals()["this is a variable"] = 5

For Haskell I use über-cool this'is'a'variable = 5

Name: Anonymous 2010-04-14 14:57

>>2
Allowing symbols with spaces would make the language a nightmare to parse, both by programmer and compiler.

Name: Anonymous 2010-04-14 15:02

>>1
fuck off troll

Name: Anonymous 2010-04-14 15:10

>>2,5
What about the lisp/scheme solution of using ||s to delimit symbols?
$ ikarus
Ikarus Scheme version 0.0.4-rc1+ (revision 1870, build 2010-03-23)
Copyright (c) 2006-2009 Abdulaziz Ghuloum

(define |don't mind me and my awesome symbols with spaces| 3)
(* |don't mind me and my awesome symbols with spaces| |don't mind me and my awesome symbols with spaces|)
9

$ sbcl
This is SBCL 1.0.35-1.fc11, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>;.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (defconstant |don't mind me and my awesome symbols with spaces| 3)

|don't mind me and my awesome symbols with spaces|
* (* |don't mind me and my awesome symbols with spaces| |don't mind me and my awesome symbols with spaces|)

9
*

Name: Anonymous 2010-04-14 15:56

>>7
You could do that with Tcl as well, and better.

% set {this is a fuckin' variable name, yo} 5
5
% puts ${this is a fuckin' variable name, yo}
5

Name: Anonymous 2010-04-14 16:07

I prefer not to be bothered by such trivial matters.
I prefer M-x glasses-mode.

Name: Anonymous 2010-04-14 20:01

i'mNotReallyAFanOfCamelCase

Name: Anonymous 2010-04-14 20:34

>>10
strLitIReallyKindOfHateHungarianNotationWithAllMyHeart

Name: Anonymous 2010-04-14 20:55


System::SomeClass::SomeOtherClass::checkIfFileExistsAndDeleteItIfItIsNotPresent(NULL, NULL, NULL, NULL);

Name: Anonymous 2010-04-14 21:54

>>12
I came

Name: Anonymous 2010-04-14 23:45

>>12
DeleteIt
IfItIs[u]Not[/u]Present

I have reached satori

Name: Anonymous 2010-04-15 0:04

>>14
You're BBcode failure suggests otherwise.

Name: Anonymous 2010-04-15 0:26

>>15
You're BBcode failure suggests otherwise.
She's BBcode?

Name: Anonymous 2010-04-15 0:52

>>16
No, she's BBcode failure.

Name: Anonymous 2010-04-15 2:20

>>5
No, it would be trivial to parse. Just separate symbols with another character.

Name: Anonymous 2010-04-15 5:06

>>15-17

b_b_code

Name: Anonymous 2010-04-15 7:05

bump

Name: Anonymous 2010-04-15 9:16

>>12
DeleteItIfItIsNotPresent
ENTERPRISE methods.

Name: Anonymous 2010-04-15 10:56

>>21
No, you could be more ENTERPRISE

Name: Anonymous 2010-04-15 11:38

Implying camelCase is unworthy
Oh you!

Name: Anonymous 2010-04-15 11:43

>>2
I don't see how you would support spaces in symbol names without some kind of delimiter, or greatly crippling the rest of the language (like that double spaces idea that someone once posted here). CL does support both variants:
this-is-a-symbol-name
|this is a symbol name|

Name: Anonymous 2010-04-15 15:52

>>24
In fact, this could be done very easily, in fact nearly as easily as "normal" variable name handling. Suppose all symbols are stored in an n-way tree in memory, such that each node served both as a value (or possibly undefined), and also as an intermediate point connecting to other values. Parsing an identifier token would consist of fetching a value from the root of the tree, and inserting that node into the AST. Supposing another identifier directly followed this top-level identifier, the node just inserted would then be used as the new "root" for looking up the second word of the variable name, and once this new word is found, the new node would replace the existing one in the AST.

So, The Sussman would actually consist of two separate entries in the symbol tree: one top-level node, created upon first encounter of a The token, with one child node, created upon first encounter of a Sussman token which immediately follows a The token.

I'd toss together some shitty code for an interpreter that could handle this, but I'm a lazy fuck.

Name: Anonymous 2010-04-15 16:09

>>25
Wouldn't that make things a lot more ambigous for human programmers to follow?

Name: Anonymous 2010-04-15 16:13

/prog/ers overload white spaces (http://www2.research.att.com/~bs/whitespace98.pdf)

Name: Anonymous 2010-04-15 16:18

>>24
Implying double spaces would cripple the language.
That was my idea, and it's still a great one. How in the world would it cripple the rest of the language? Even if for some strange reason, you didn't want to do that, you could introduce a "breaking space" character and use that between symbols.

Name: Anonymous 2010-04-15 16:25

>>27
☎✆(); // take phone (☎) off hook (✆)
This must be a fucking troll.

Name: Anonymous 2010-04-15 16:26

Overloading \\ (double backslash) to mean "everything before this is a comment" has proven another
useful transition tool. It allows old-style and new-style code to coexist:
    my_phone->off_hook(); // \\ ☎✆
wat

Name: Anonymous 2010-04-15 16:28

>>29
actually overloading \\ (double backslash) to mean "everything before this is a comment) is the preferred solution:

my_phone->off_hook(); // \\ ☎✆

Name: Anonymous 2010-04-15 16:30

lol'd hard, thanks >>27

Name: Anonymous 2010-04-15 17:04

>>27
Bjarne Stroustrup
Why am I not suprised? Someone should post this to reddit or something so we can see some deluded Seppler try to justify this.

Name: Anonymous 2010-04-15 17:09

>>33
But it's an April's Fool, isn't it?

Name: Anonymous 2010-04-15 17:10

>>34
With C++, you can never tell.

Name: Anonymous 2010-04-15 17:16

>>27,34,35
Somewhere, a C++ committee member has read this and thought it was a serious, and great, idea. True story.

Name: Anonymous 2010-04-15 17:17

>>35
It said about April's Fool at the end (right after they talked about source code in 3D).

Name: TROLLGOL Dev 2010-04-15 17:23

>>27
I have much to learn

Name: Anonymous 2010-04-15 18:35

Name: Anonymous 2010-04-15 18:55

>>39
It exists only in the hearts and minds of /prog/riders

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List