January 24, 2013
On Thu, 24 Jan 2013 11:25:38 -0500
Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> On 1/24/13 3:20 AM, Jacob Carlborg wrote:
> > On 2013-01-24 03:02, Nick Sabalausky wrote:
> >
> >> foo.bar() // Perform action
> >> foo.bar // Access data
> >
> > Who says it has to be like this.
> 
> Agreed. It's an implied, unstated assumption - the most dangerous kind.
> 

It's dangerous to *break*, not to follow.

January 24, 2013
On Thursday, January 24, 2013 11:30:46 Andrei Alexandrescu wrote:
> On 1/24/13 4:28 AM, monarch_dodra wrote:
> > We actually have one, which I think I agree with: http://wiki.dlang.org/DIP21
> 
> Walter convinced me last night that eliminating @property is more sensible.

Well, that's bad news. It's bad enough that @property hasn't been properly sorted out, but getting rid of it completely disregards the problems that it's trying to solve. Getting rid of @property would be a horrible move IMHO.

- Jonathan M Davis
January 24, 2013
Am Thu, 24 Jan 2013 20:26:25 +0100
schrieb "Jonathan M Davis" <jmdavisProg@gmx.com>:

> On Thursday, January 24, 2013 11:30:46 Andrei Alexandrescu wrote:
> > On 1/24/13 4:28 AM, monarch_dodra wrote:
> > > We actually have one, which I think I agree with: http://wiki.dlang.org/DIP21
> > 
> > Walter convinced me last night that eliminating @property is more sensible.
> 
> Well, that's bad news. It's bad enough that @property hasn't been properly sorted out, but getting rid of it completely disregards the problems that it's trying to solve. Getting rid of @property would be a horrible move IMHO.
> 
> - Jonathan M Davis

Especially as it means that we have to deprecate @property first and it'll probably stay around for at least another year.
January 24, 2013
24-Jan-2013 06:46, Nick Sabalausky пишет:
> On Wed, 23 Jan 2013 18:38:11 -0500
> Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> The real question is "Is this an action or data?" (And obviously I mean
> when viewed from outside the encapsulation, I don't mean the
> implementation.) Note that the answer to that question is NOT
> subjective to the context of the caller, only the callee. Blindly
> discounting the "conceptual" matter (ie "action or data?") is a
> convenient way contort the issue so that it fits back into the "Call
> with/without parens?" strawman.
>

These days properties imply an action of, well, obtaining said value. If it's a wrapper as in "return zis variable" something is wrong already.

> There have already been enough problems shown that have arisen as a
> direct result of mistreating the matter of properties as merely
> an "optional paren" syntax matter. You suggest various additional rules
> to patch over those symptoms, but when you consider the very simple,
> time-honored, and frankly very very common, association of:
>
> foo.bar() // Perform action
> foo.bar   // Read/Write data

The same argument was brought about overloading  operators, about overloading functions, etc. In other words the argument is WYSIWYG, but humans inherently think in overloaded notions and take obvious shortcuts
just about everywhere.

Also what about x.y itself? Unlike in C/C++ you don't know if x is a pointer or not. And so what? Add to this possible static members, D already cuts corners and not at all WYSIWYG. Also see the opDispatch problems as it can be either property or not. @property on its own brings a lot of schism.

What makes all of the engineering, science etc. domains usable at all - is an optimized/overloaded/shortened vocabulary. In this light extra parens are redundant and thus skipped, end of story. Feel free to impose a coding standard that requires usage of these and see how it goes.

-- 
Dmitry Olshansky
January 24, 2013
24-Jan-2013 12:53, Jacob Carlborg пишет:
> On 2013-01-24 00:07, Nick Sabalausky wrote:
>
>> Honestly, I really don't like that. It trades clear semantics for a
>> bunch of magic to achieve the dubious goal of making code look more
>> like English (a notably high-ambiguity language). If I valued languages
>> imitating English, I'd be doing everything in HyperCard or COBOL or
>> some other such design blunder.
>
> That's unclear with the semantics?
>

+1
It's crystal clear, and the less noise the better IMO.

-- 
Dmitry Olshansky
January 24, 2013
> "Right, it's a function call. So what in the world do we gain by
> allowing the caller to make it look like something it isn't?"
Nothing!
January 24, 2013
On Thu, 24 Jan 2013 14:37:28 +0100
"Adam D. Ruppe" <destructionator@gmail.com> wrote:

> On Thursday, 24 January 2013 at 05:16:32 UTC, Nick Sabalausky wrote:
> > I think that shows how different editors or even just personal typing styles can affect our coding style. For me, I'll do stuff like:
> 
> 
> Aye, I think this applies to my non-caring about identifier name length too - I use tab completion in my editor.
> 

I tend to do a lot of copy/paste for symbol names. Maybe not as good as auto-complete, but with either of these (depending on the situation and my whims):

1. Up/Down/Ctrl-Left/Ctrl-Right/Home/End to line/word-skip to one end of
ident
2. Shift-Ctrl-(Left or Right) to select ident
3. Ctrl-C (copy)
4. Up/Down/Ctrl-Left/Ctrl-Right/Home/End to line/word-skip to target
5. Ctrl-V (paste)
6. Goto 4 if needed

(Less frequent, but nicer for long distances or if my hand is already
on the mouse):
1. Right hand: Double-click ident
2. Left hand: Ctrl-C (copy)
3. Right hand: Click target
4. Left hand: Ctrl-V (paste)
5. Goto 3 if needed

Been doing both long enough that muscle memory makes either of them quick, natural operations. Ctrl-Arrow and Home/End are fucking awesome :)

Anyway, point being, with either of those, longer idents don't bother me much either (unless it gets the the point where line lengths for simple things get too long, or I can't distinguish between the idents without reading them).

> I've tried some of those auto parens things, and it just confuses me.

They're not my thing either. Same thing for when they auto-indent big
checks of code (I can do that myself with Shift-Ctrl-Up/Down and then
Tab). It certainly *could* be helpful for some, but I don't like when
the editor tries to anticipate my typing style and changes things around
while I'm typing. It's like having someone reach over my shoulder while
I'm working and "help out" by banging on the keyboard uninvited
without them having any idea what my muscle memory, habits and concious
intent are just about to make me type.

I do very much like having <Enter> copy the same indentation of the previous line into the newly-inserted line, but that's about it.

> I guess I could get used to it (I recently started playing one of those newer shooter games. I come from Perfect Dark on the N64, so I'm used to what Halo called "legacy controls". The new controls were totally unusable to me.... but I was forced to stick with it for a while and now kinda am ok. I just hope it hasn't ruined my aptitude at PD controls! Perfect Dark is still the best shooter ever.).

Yea, those "Halo" controls are usually just called "Dual Analog" first-person controls. I think they're an abomination compared to having a *real* pointing device, like a mouse/trackball or Wii's IR pointing (Yea, the Wii's gesture recognition is crap as everyone says, *but* the IR pointing works great and is a killer feature IMO). But when I'm playing some first-person game that won't let me use a real pointing device (ex: most PS3 first-persons, all XBox1 first-persons) then I've always found the dual-analog to at least be a huge improvement over the older single-analog designs.

But the notable exception for me is Metroid Prime: The single-analog controls in 1 and 2 worked great for that game, and 3's IR-pointing was botched and crappy - I hated it. Red Steel 1 and Call of Duty 3 did IR pointing the *right* way, even though I never liked Call of Duty 3 overall, and Red Steel's controls *did* turn shitty during the unfortunate sword battles.

But you're right, Perfect Dark *is* a great game. :)


> > Heh, actually, case in point, take a look at my normal work setup:
> 
> lol, I got one of those ipads as a gift last year. I found it totally useless except for the angry birds and watching some video streams, i.e. not work at all.
> 

Yea. For work, I spent most of 2012 in possession of a loaner iPhone 4 (and some Android thing). I got the urge to hurl it into the nearest concrete wall every time I used it. I don't think there was a single thing about it I liked. At the end, packaging it up to send back felt like Christmas morning :)

Angry Birds gets a lot of flack for, I guess, being a bit too popular
and overly-marketed. But thing about it though, is it's pretty much the
only phone/tablet game out there that *isn't* total crap. (And the
"In Space" one is actually quite good.) All the other games on those
devices either have those completely unusable "soft gamepad"
abominations, or just simply have extremely minimal gameplay. And most
of them are just clones of each other.

I do kinda want to get a WiFi-only Android thingamadoo though. Not because I like it (I don't - it was clearly designed by people who considered the iPhone to be perfection), but only because I could use a new camera and a WiFi-connected PDA, and PalmOS is unfortunately dead and therefore no longer an option.

> But, I wanted a computer in my other room last week. My laptop is never at home, so I looked into buying something.
> 
> And my decision was sure to be painful to Steve Jobs: I bought an off brand usb thingy for the pad, and a full sized (Microsoft brand LOL) keyboard. Combined with an ssh app for the pad thingy (death to lowercase i), it became almost useful.
> 

Heh, yea. Having ultra-mobile SSH is pretty damn cool. Part of why I want a new PDA.

> So I was only in for $20 and now have a halfway usable portable computer. No mouse though. Yes arrow keys (thank god, the morons at Apple refuse to put them in, which makes this thing utterly useless for anything other than their small set of sanctioned activities. OK, that apparently serves millions of people and turns an enormous profit, but that doesn't matter to /me/!). But, surprisingly, no to home and end!
> 

/me nods head in total agreeance.

Manufacturers figure "Ehh, *most* people don't use them and we don't give a shit about the rest, so let's just throw them away." Which is going to lead to a need to start seeing special "Programmer Keyboards" in the US like other countries have. Of course, these will probably end up being as expensive as the rip-off "Gamer Keyboards" that are out there.

In computers, companies have actually managed to turn "knowing what you're doing" into a liability.

> Still though, 3/4 of a real keyboard is lightyears beyond the touch nonsense,

Oh absolutely.

More like "non-touch" though. It's absolutely insane that these companies toss around the word "touch" like crazy despite the clear fact that they're systematically *eliminating* any and all touch sensation, they're not adding one damn bit of touch. Thay're *not* "touch", they're very much *anti*-touch. Idiots.

> and the price for the hack beat the crap out of buying a real computer.
> 

Not if you didn't already have the iPad. Those things are expensive. I got my laptop last spring (with dual-core, 64-bit, 4GB RAM, 320GB HDD, USB 3, HDMI/VGA-out, DVD burning, Intel HD graphics which is actually quite capable for many games, not that I needed that), for only $340. Add in a few cheap accessories from MicroCenter (by far the best computer store I've ever found - as long as you ignore the salesmen), and I think it came out pretty well.

Still not nearly as portable as a netbook, and I *hate* the 16:9
screen that's become the ONLY option (unless you want one of those
completely moronic 2.x:1 screens that some companies actually offer) but
hey, beats the old desktop, and a damn better price than the ~$2000
that was typical for a decent portable 12/13 years ago when I'd bought
my first laptop (I'd made sure to splurge for the active-matrix
screen ;) ).

Speaking of, what's a good Linux for laptops these days? I'm anxious to get rid of this horrid Win7 that was preinstalled (XP is genuinely a possible option for me). Most of my recent Linux experience is debian-based ((Ku/U)buntu a few years back and Debian 6 more recently). I'm planning to give Mint a test drive in a VM. Is that any good for laptops, or is "laptop" a non-issue for linux these days?


> > Geez, we still don't have that?
> 
> We spend too much time arguing over optional parenthesis!

Heh :)

Honestly, I'm *really* surprised that I didn't notice the continued lack of += on properties. Must have gotten used to avoiding it or something, I guess? I dunno.

January 24, 2013
On 1/24/13 2:26 PM, Jonathan M Davis wrote:
> On Thursday, January 24, 2013 11:30:46 Andrei Alexandrescu wrote:
>> On 1/24/13 4:28 AM, monarch_dodra wrote:
>>> We actually have one, which I think I agree with:
>>> http://wiki.dlang.org/DIP21
>>
>> Walter convinced me last night that eliminating @property is more sensible.
>
> Well, that's bad news. It's bad enough that @property hasn't been properly
> sorted out, but getting rid of it completely disregards the problems that it's
> trying to solve. Getting rid of @property would be a horrible move IMHO.

No, the idea is to use better inference for the cases in which @property would be appropriate.

So we are looking at _changing_ the language, not simply ignoring @property.


Andrei

January 24, 2013
On Thursday, January 24, 2013 15:14:36 Andrei Alexandrescu wrote:
> On 1/24/13 2:26 PM, Jonathan M Davis wrote:
> > On Thursday, January 24, 2013 11:30:46 Andrei Alexandrescu wrote:
> >> On 1/24/13 4:28 AM, monarch_dodra wrote:
> >>> We actually have one, which I think I agree with: http://wiki.dlang.org/DIP21
> >> 
> >> Walter convinced me last night that eliminating @property is more sensible.
> > 
> > Well, that's bad news. It's bad enough that @property hasn't been properly sorted out, but getting rid of it completely disregards the problems that it's trying to solve. Getting rid of @property would be a horrible move IMHO.
> No, the idea is to use better inference for the cases in which @property would be appropriate.
> 
> So we are looking at _changing_ the language, not simply ignoring @property.

Then what do you mean to do with @property? Regardless of what we do with paren-less function calls, I think that it's important to have explicit properties - particularly when you consider enhancement requests such as http://d.puremagic.com/issues/show_bug.cgi?id=8006 (which we probably should have implemented ages ago).

- Jonathan M Davis
January 24, 2013
On 01/24/2013 04:45 PM, Johannes Pfau wrote:
> Am Thu, 24 Jan 2013 09:20:44 +0100
> schrieb Jacob Carlborg <doob@me.com>:
>
>> On 2013-01-24 03:02, Nick Sabalausky wrote:
>>
>>> foo.bar() // Perform action
>>> foo.bar   // Access data
>>
>> Who says it has to be like this.
>>
>
> .NET guidelines since .NET 1.1 for example:
>
> "In general, methods represent actions and properties represent data."
> (http://msdn.microsoft.com/en-us/library/bzwdh01d%28v=vs.71%29.aspx).
>

This is not C#.