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:
Anonymous2012-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
>>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?
>>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.
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).
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.
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:
Anonymous2012-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.
>>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.
>>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;
if intpos; 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. charinstring are three bold symbols (a type, a keyword, and a type), but char in string is a single identifier (a standard library procedure).
Name:
Anonymous2012-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.
>>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?
>>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...
>>43
That's because Windows 1.0 appeared in 1985, and the first C standard was published four years later.
Name:
Anonymous2012-08-20 7:35
>>45
WinAPI did not appear until Win95, and the conventions Mr. >>36 refers to appeared in Win98 which was a complete rewrite (including rewrite of most of WinAPI).
The worst coding convention is probably Intel's. It looks like some mad scientist bred GNU coding style with Microsoft's.
Name:
Anonymous2012-08-20 8:53
All lowercase & terse is the only valid naming convention; except for macros, which should be UPPERCASE; and enums & defines which should be Titlecase, or even judiciously used CamelCase.
Best coding convention is to avoid uppercase and compound identifiers altogether. Why waste your mind on reading and remembering kilobytes of silly long words when you should really be operating on abstract concepts?
s f g x = f x (g x)
k x y = x
b f g x = f (g x)
c f g x = f x g
y f = f (y f)
cond p f g x = if p x then f x else g x
fac = y (b (cond ((==) 0) (k 1)) (b (s (*)) (c b pred)))
This way you don't waste time recalling how a function was called, was it widgetContainerFactoryIndexFactory or was it widgetContainerIndexFactoryFactory?
>>52 >>54
The ASL compiler probably isn't the best example of a Intel "house style". Anything ACPI is going to be strongly influenced by the relevant specifications, much of which were written by (guess who!) Microsoft people.
>>61
APM is a proprietary and closed ``standard''.
APM is widely inconsistent across devices.
APM is very limited in what it can be used for.
ACPI is an open standard.
ACPI is extensible.
ACPI is user- and developer-friendly.
Name:
tdavis2012-08-24 5:57
Lose those Burgenstocks, and the dorky bike helmet.
LoseThos is a x86_64, ring-0-only (like DOS), identity-mapped, multi-cored, multi-tasking, non-networked, free,
100% open source, public domain, PC operating system. It is 135,000 lines of code and includes a 64-bit compiler.
It has a command line that feeds into a C-ish compiler. I wrote every line from scratch over the last nine years
(full-time) and not even ASCII was sacred -- there are binary graphics in source code.
Did you know the C64 did not use ASCII? I had a book in high school, Mapping the Commodore 64, that told how to
control all the hardware and what all the inside of the ROM did. I spent a lot of time just screwing around exploring it.
LoseThos is not a permanent home for everyone, but it's so exotic, mind-opening and intriguing that it's sure to
provide as much entertainment as a AAA game, if you just boot and don't install. (You can install if you want to.) Kids
today seem very close minded. When I grew-up, there weren't established categories of games and it never
occurred to me there were only so many types of games.
I've been imprisoned by the FBI and have missed my window on the market. Now, Microsoft and Intel have banned
operating systems with secure boot. Unless an act of God or order from God happens, I don't know. He'll have to
get biblical on their asses. I'm shocked how nobody reacts to God talking.
>>62 ACPI is (...) developer-friendly.
What the fuck.
Name:
Anonymous2012-08-24 13:42
>>65
It is consistent and reliable, it is truly cross-platform while APM is not.
Name:
Anonymous2012-08-24 17:04
It is consistent and reliable, it is truly cross-platform
Only if you're not working on real hardware.
Name:
Anonymous2012-08-24 18:07
ACPI's AML is complex beyond belief. Why didn't they just use Lisp or Forth instead?
Name:
Anonymous2012-08-24 22:49
>>68
Microsoft and Intel can't design anything right the first time, and they can't get rid of old designs because of backwards compatibility, so every mistake and poorly designed feature sticks around for decades. Look at Win32 and x86.
Hitting shift and typing a letter at the same time is faster than reaching for a separate key (or worse, shift + a separate key for an underscore). camelCase is the most efficient method of separating words.
Scrum Master
Scrum is facilitated by a Scrum Master, sometimes written as ScrumMaster, who is accountable for removing impediments to the ability of the team to deliver the sprint goal/deliverables.
What amazes me is that fucking years after PEP-8 was published and widely accepted there are people who go on creating projects where all methods areCalledLikeThis as if they were still writing their familiar java/c# turdshit. It's been 11 FUCKING YEARS, would it fucking murder these twisted, tornado, unittest etc guys to fucking adhere to it? I couldn't give an infinitely small amount of fuck about their language background and that they are used to it, this is just fucking infuriating.
Name:
Anonymous2012-08-31 11:59
Twisted naming convention is a fucking mess The Protocol class used throughout this document is a base implementation of IProtocol used in most Twisted
applications for convenience. To learn about the complete IProtocol interface, see the API documentation for
IProtocol.
Who the fuck calls classes IProtocol? It's fucking PYTHON you fucking moron, there are no interfaces here!!!