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

shittyCase

Name: Anonymous 2012-08-13 10:47

Why did people even consider using this shitty unreadable method of separating words inside compound identifiers?  Why the fuck is it recommended style for Javascript, Haskell and other half-decent languages?  Why does Python use it in some of its identifiers (but not in all, because it is inconsistent shit)? 

Why won't underscores do (or even real spaces for some languages)?  Makes code much more readable.

Name: Anonymous 2012-08-13 10:51

don't know either.

probably mob effect: the built-in standard classes use that, so every other class is mimicking that, and it all goes shit from that

Name: Anonymous 2012-08-13 11:26

>>2
It is good practice to use the style which the standard library uses in your programs (if it follows any sort of consistent style, i. e. not PHP or Perl, as their libs all use a multitude of styles; Python has inconsistent standard library as well, but it is greatly alleviated by the popular PEP-8).

However, why would any language designer conscientiously choose the worst possible style for his new (or even not yet written) standard library?

Name: Anonymous 2012-08-13 11:45

lisp-case-supremacy

Name: Anonymous 2012-08-13 11:54

>>4
Shit because lispers for decades fail to move on to having better syntax which allows fucking infix epressions.  Ignoring the infix minus possibility, - is still no better than _ as a separator.

Name: Anonymous 2012-08-13 11:59

>>5
Yes, it is because you don't have to use shift.

Name: Anonymous 2012-08-13 12:10

Fucking true. I was interested in Haskell a while back but shittyCase just made me want to bleach my eyes.

Name: Anonymous 2012-08-13 12:34

>>6
I spend very little time actually typing in code.  I spend much more time reading it.  So this is a non-issue for me, and readability is.

Name: Anonymous 2012-08-13 14:45

>>5
examplify this touted ``infix expressions'' shit and why it would even ever be used ever by anyone EVER

Name: Anonymous 2012-08-15 9:26

By the way C (and, by extension, C++, D, Jewa, C#, Javashit and all other shit languages with syntax derived by C, except Perl) could use real spaces inside identifiers, because using two alphanumeric identifiers next to each other is illegal syntax anyway.

E. g. there is no valid C construction where you can write
foo bar.  It should have some sort of operator or syntactic token between them.

In Perl it is impossible because you can omit parens during function calls (like in Haskell after which Perl was modelled).

Name: Anonymous 2012-08-15 9:36

Compare this:

Q.Interface.prototype.defaultValue = Q.makePropertyAccessor('__defaultValue__');
Q.Interface.prototype.restoreDefaultValue = function () {
    this.value(this.defaultValue());
};

and

Q: Interface: prototype: default value = Q: make property accessor('__ default value __');
Q: Interface: prototype: restore default value = function () {
    this: value(this: default value());
};


This was the code that I was looking at at the moment of writing, and it's not so bad.  But consider how many identifiers like addContainerToCollection are out there in other places.

I also replaced the dot with semicolon because dot looks silly in the upgraded syntax.  It is not used anywhere else because JS does not have goto labels and does not support Python-like array slices, and the goto-like labels for case can be replaced with something more sensible.

Name: Anonymous 2012-08-15 11:28

Even jabba looks much nicer and actually somewhat readable:

namespace Abstract Factory
{
    public interface I. Button
    {
        void Paint();
    }
 
    public interface I. GUI Factory
    {
        I. Button Create Button();
    }
 
    public class OS X Button : I. Button // Executes fourth if OS:OSX
    {
        public void Paint()
        {
            System: Console: Write Line("I'm an OSXButton");
        }
    }
...


Since we liberated . from being a property/method separator token we can use it inside compound symbols to denote abbreviations.  Yes, it looks a bit more verbose, but this kind of benign verbosity offsets the grotesque ugliness of jabba's own intrinsic verbosity.  I find it a successful example of fighting fire with fire.

Name: Anonymous 2012-08-16 14:27

>>12
The dot character is used very often and it is one of the easiest syntax characters to type in dvorak, so replacing it with the colon is retarded as the colon is awkward to type on both dvorak and qwerty.

Name: Anonymous 2012-08-16 15:14

How about Ada_Case?

Name: Anonymous 2012-08-16 15:40

>>3
Good practice to whom? IMHO, using the same capital letter style like in the standard lib(s) is just a game of luck not to collide with any lib-defined symbols. E.g. in C I wouldn't recommend to anybody to write function names / global vars all lower case because that eliminates possible clashes since C stdlib symbols are lower case.

Name: Anonymous 2012-08-16 15:44

Type_name
variable_name
MACRO_NAME

Name: Anonymous 2012-08-16 16:52

>>10
E. g. there is no valid C construction where you can write foo bar.  It should have some sort of operator or syntactic token between them.
typedef int foo;
foo bar;

Name: Anonymous 2012-08-16 18:23

>>11
You made me realize only shitty verbose languages encourage the use of shittyCase

Thanks >>11-san

Name: Anonymous 2012-08-16 21:16

>>3
In C this is a bad idea.

Name: Anonymous 2012-08-16 21:45

>>8
WhatIsUnreadableAboutThis?ICanReadItJustFine.

Name: Anonymous 2012-08-16 21:56

implying you are a substandard coder
implying programmers are more efficient when making unnecessary keystrokes

Name: Anonymous 2012-08-16 22:21

>>21
text_content_inference(>>21, or(from(/g/, >>21), and(from(/prog/, >>21), trolling(>>21, /prog/))))

from(/g/, >>21) -> inconclusive.
trolling(>>21, X) -> inconclusive.

Name: Anonymous 2012-08-16 22:58

if
     int pos;
     char in string(c, pos, "0123456789ABCDEF"[@0]) orel
     char in string(c, pos, "abcdef"[@10])
then
     pos
else
     -1
fi
Algol 68 uses spaces in identifiers. char in string are three bold symbols (a type, a keyword, and a type), but char in string is a single identifier (a standard library procedure).

Name: Anonymous 2012-08-16 23:25

>>23
Nice. Sometimes I wonder why do we have over 9000 different shitty languages if LISP and Algol 68 already offer us everything we will ever need.

Name: Anonymous 2012-08-17 3:24

>>17
typedefs are the shittier part of C anyway

Name: Anonymous 2012-08-17 3:40

>>24
I agree. I should file a complaint to my university and asking why we learned python, c++, ruby and java the first year instead of Algol 68. I like Algol 68. Any good modern compilers?

Name: Anonymous 2012-08-17 5:19

>>24
(oh(god(this(is annoying))))

Name: Anonymous 2012-08-17 6:37

>>27
If it isn't s-exp, it's absolute pig disgusting shit.

Name: Anonymous 2012-08-17 9:25

>>27
God is Jewish. Remember that we, goyim, have different Gods.

Name: Anonymous 2012-08-17 11:05

>>22
prolog is fucking shit

>>21
fuck off back to /r/technology

Name: Anonymous 2012-08-19 1:28

>>19
C has been around so long that you can often guess a programmer's (or program's) heritage based on what convention is used. AT&T devotees and Linux kernel hackers prefer all lower case, separated by underscores.  The MIT/X11 guys, GL programmers, and C++ refugees mostly prefer camel case.  Camel case with all uppercase typedefs (especially for pointers) is a sure sign of a Windows programmer...

Name: Anonymous 2012-08-19 1:45

underscores_are_more_readable
CamelCaseIsEasierToType

WhichOneIsMoreImportant: readability_of_course!

just_swap_dashes_to_underscores_with_software

Name: Anonymous 2012-08-19 1:53

check them

Name: Anonymous 2012-08-19 4:46

>>33 niceDubs_dude

Name: Anonymous 2012-08-19 8:33

>>32, see >>21

Name: Anonymous 2012-08-19 14:07

>>31
Oh god yes, LPTSTR szFoo = TEXT("This sux");
LPTSTR szBar = TEXT("derp!");
DWORD dwRes = MessageBoxEx((HWND)NULL, szFoo, szBar, MB_ABORTRETRYIGNORE|MB_ICONSTOP|MB_DEFBUTTON2|MB_TASKMODAL, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));

So much caps, it's almost COBOL.

Name: Anonymous 2012-08-19 14:08

>>36
Actually, it's LPCTSTR because those strings are constant.

Name: Anonymous 2012-08-19 14:10

>>36
(HWND)NULL
Fuck SEPPLES.

Name: Anonymous 2012-08-19 14:13

Oh wait, HWND is FrozenLPVOID. Allright, casting an LPVOID to LPVOID.

Name: Anonymous 2012-08-19 15:05

>>39
Implementation defined. Got to hold up my end of the contract.

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