Re: Project Elvis

2017-11-09 Thread Adam Wilson via Digitalmars-d

On 11/6/17 12:20, Michael wrote:

I can't quite see why this proposal is such a big deal to people - as
has been restated, it's just a quick change in the parser for a slight
contraction in the code, and nothing language-breaking, it's not a big
change to the language at all.

On Monday, 6 November 2017 at 19:13:59 UTC, Adam Wilson wrote:

I am all for the Elvis operator, however I have two reservations about
it. The first is that I don't see much use for it without a
null-conditional. The second is that the current proposed syntax ?: is
MUCH to easily confused with ?.

This is not easy to read: obj1?.obj2?.prop3?:constant.

When designing syntax sugar, ergonomics are very important, otherwise
people won't use it. Microsoft spent a LOT of time and treasure to
learn these lessons for us. I see no reason to ignore them just
because "we don't like Microsoft"

My proposal would be to copy what MSFT did, expect that I would I
would introduce both operators at the same time.

Syntax as follows: obj1?.obj2?.prop3 ?? constant

In practice I don't see much use of the idiom outside of null's. The
ONLY other thing that would work there is a boolean field and you
might as well just return the boolean itself because the return values
have to match types.


I feel this is kind of embellished somewhat. When you write


This is not easy to read: obj1?.obj2?.prop3?:constant.


you're not separating it out as you do when you write your preferred
version:


Syntax as follows: obj1?.obj2?.prop3 ?? constant


How is


obj1?.obj2?.prop3 ?: constant


not as easy to read as



obj1?.obj2?.prop3 ?? constant




You're right, I didn't, that was intentional, because sometimes people 
write things like that. And it took a while for anyone to say anything 
about it. That is my point.


But that's the thing. The ?? is significantly more obvious in the 
condensed version.


This is something that a UX designer would recognize instantly, but 
human factors are very definitely not our strong skill as engineers. 
FWIW, my human factors experience comes from the deep study of airline 
crashes that I do as a pilot.



to me they are the same in terms of readability, only with ?? you have
greater chances of mistyping and adding a second ? in there somewhere,
whereas the ?: is just a contraction of the current syntax, I really
don't think it's that difficult, so I'm not sure what people's hang-ups
are, but I don't think the argument that ?? is easier to read than ?:
holds any weight here, because one *is* a change to the language, and
the other is a change to the parser and a contraction of a standard
convention.



Two things. ?: is ALSO a change a to language (lexer+parser). As to the 
whole "it's no more likely to typo the colon than the question" 
argument, sure, but that depends on the keyboard layout more than 
anything else, what works for you may not work elsewhere. And in either 
case, it's an easy compiler error. So you don't win anything with the 
?:, but you win readability with the ??. MSFT spends a LOT of time 
studying these things. It would be wise to learn for free from the money 
they spent.



--
Adam Wilson
IRC: LightBender
import quiet.dlang.dev;


Re: [OT] mobile rising

2017-11-09 Thread jmh530 via Digitalmars-d

On Friday, 10 November 2017 at 01:19:06 UTC, codephantom wrote:


Well, everytime I wanted to find something, I had to google 
it...


Then I realised I had to pay for it as well...and, that's when 
i gave up.


Bill Gates wasn't the richest man in the world for so long 
without reason. ;)


Re: [OT] mobile rising

2017-11-09 Thread codephantom via Digitalmars-d

On Thursday, 9 November 2017 at 14:42:41 UTC, Joakim wrote:
As I said earlier, the mobile OS story is not over yet, there 
are more changes to come.


Yeah...like more factories making more dongles.

You want a dongle?

https://www.youtube.com/watch?v=-XSC_UG5_kU



Re: [OT] mobile rising

2017-11-09 Thread Jerry via Digitalmars-d

On Friday, 10 November 2017 at 01:04:05 UTC, codephantom wrote:
On Friday, 10 November 2017 at 00:23:03 UTC, Jonathan M Davis 
wrote:
I don't disagree that there are differences between FreeBSD 
and Linux, but my point is that for most folks, the 
differences are small enough that it's not all that different 
from trying to convince someone to use one Linux distro or 
another - especially if you're trying to convince a Windows 
user, since Windows is so drastically different from both.


My Windows 10 just finished downloading.

I installed it, and even a technie nerd like me couldn't work 
it out.


I think Windows 10 is enough to convince users to switch ... to 
anything ;-)


https://www.youtube.com/watch?v=KHG6fXEba0A


Not much of a technie nerd if it "just finished" and you've 
already exhausted your knowledge and have given up :). Just 
sayin'.


Re: [OT] mobile rising

2017-11-09 Thread codephantom via Digitalmars-d

On Friday, 10 November 2017 at 01:15:26 UTC, Jerry wrote:
Not much of a technie nerd if it "just finished" and you've 
already exhausted your knowledge and have given up :). Just 
sayin'.


Well, everytime I wanted to find something, I had to google it...

Then I realised I had to pay for it as well...and, that's when i 
gave up.


Re: [OT] mobile rising

2017-11-09 Thread codephantom via Digitalmars-d
On Friday, 10 November 2017 at 00:23:03 UTC, Jonathan M Davis 
wrote:
I don't disagree that there are differences between FreeBSD and 
Linux, but my point is that for most folks, the differences are 
small enough that it's not all that different from trying to 
convince someone to use one Linux distro or another - 
especially if you're trying to convince a Windows user, since 
Windows is so drastically different from both.


My Windows 10 just finished downloading.

I installed it, and even a technie nerd like me couldn't work it 
out.


I think Windows 10 is enough to convince users to switch ... to 
anything ;-)


https://www.youtube.com/watch?v=KHG6fXEba0A



Re: [OT] mobile rising

2017-11-09 Thread codephantom via Digitalmars-d
On Friday, 10 November 2017 at 00:23:03 UTC, Jonathan M Davis 
wrote:
Plenty of us do get picky about details, which would lead us to 
one or the other, depending on our preferences, but there are 
way more similarities than differences - to the point that to 
many folks, the differences seem pretty superficial.


- Jonathan M Davis


No, the diffs really are considerable. FreeBSD is not Linux.

For example, FreeBSD doesn't have systemd ;-)

https://www.youtube.com/watch?v=MpDdGOKZ3dg



Re: [OT] mobile rising

2017-11-09 Thread Jonathan M Davis via Digitalmars-d
On Thursday, November 09, 2017 23:42:37 codephantom via Digitalmars-d wrote:
> On Wednesday, 8 November 2017 at 11:47:32 UTC, Jonathan M Davis
>
> wrote:
> > Oh, I'm all for using FreeBSD, but most of the arguments for
> > using FreeBSD over Windows apply to Linux. And if you can't get
> > someone to switch from Windows to Linux, you're not going to
> > get them to switch to FreeBSD. FreeBSD and Linux are definitely
> > different, but the differences are small when compared with
> > Windows.
>
> Except, that Linux/GNU is basically a clone of a clone.
>
> BSD is...just BSD..from which all the clones are made ;-)
>
> More importantly, is the GPL vs BSD licence thing.
>
> If you examine GPL code, and think..mmm..that looks good, I might
> use it in my appthen you're in trouble is you distribute that
> app without also distributing your code.
>
> BSD gives you 'genuine freedom' to use the code as you see fit -
> just don't try claiming that you wrote it, or you'll be in
> trouble.
>
> There is also the 'distribution' thing...FreeBSD is a single,
> managed, complete distrbution. Linux is just a kernel. It's
> combined with various GNU stuff to make up a distribution, and
> most distrubtions make their own little changes here and there,
> and you never really know what's going on. With FreeBSD there is
> only the FreeBSD distribution.
>
> So there maybe similiarities between FreeBSD and Linux/GNU, but
> their differences are really significant and warrant attention.
>
> Oddly enough, whatever draws me to FreeBSD, also draws me to D -
> I'm still not sure what it is...but the word 'freedom' keeps
> coming to mind. I cannot say that for Linux as much. I cannot say
> that for golang. They offer freedom, and at the same time setup
> out to restrict it.

I don't disagree that there are differences between FreeBSD and Linux, but
my point is that for most folks, the differences are small enough that it's
not all that different from trying to convince someone to use one Linux
distro or another - especially if you're trying to convince a Windows user,
since Windows is so drastically different from both. In most cases, whether
you run FreeBSD or Linux really comes down to preference. For the most part,
they both serve people's needs very well and on the surface aren't very
different.

I definitely prefer the BSD license to the GPL as well as how the BSDs
typically go about designing things, but if you don't care about the
licensing situation, whether it even matters to you which you're using
starts getting down to some pretty specific stuff that would seem fairly
esoteric to a lot of folks (especially non-geeks). It's even the case that
most software that runs on one runs on the other - including the desktop
environments - so while the differences definitely matter, they tend to be
pretty small from the end user's point of view. Plenty of us do get picky
about details, which would lead us to one or the other, depending on our
preferences, but there are way more similarities than differences - to the
point that to many folks, the differences seem pretty superficial.

- Jonathan M Davis



Re: [OT] mobile rising

2017-11-09 Thread codephantom via Digitalmars-d
On Wednesday, 8 November 2017 at 11:47:32 UTC, Jonathan M Davis 
wrote:


Oh, I'm all for using FreeBSD, but most of the arguments for 
using FreeBSD over Windows apply to Linux. And if you can't get 
someone to switch from Windows to Linux, you're not going to 
get them to switch to FreeBSD. FreeBSD and Linux are definitely 
different, but the differences are small when compared with 
Windows.


Except, that Linux/GNU is basically a clone of a clone.

BSD is...just BSD..from which all the clones are made ;-)

More importantly, is the GPL vs BSD licence thing.

If you examine GPL code, and think..mmm..that looks good, I might 
use it in my appthen you're in trouble is you distribute that 
app without also distributing your code.


BSD gives you 'genuine freedom' to use the code as you see fit - 
just don't try claiming that you wrote it, or you'll be in 
trouble.


There is also the 'distribution' thing...FreeBSD is a single, 
managed, complete distrbution. Linux is just a kernel. It's 
combined with various GNU stuff to make up a distribution, and 
most distrubtions make their own little changes here and there, 
and you never really know what's going on. With FreeBSD there is 
only the FreeBSD distribution.


So there maybe similiarities between FreeBSD and Linux/GNU, but 
their differences are really significant and warrant attention.


Oddly enough, whatever draws me to FreeBSD, also draws me to D - 
I'm still not sure what it is...but the word 'freedom' keeps 
coming to mind. I cannot say that for Linux as much. I cannot say 
that for golang. They offer freedom, and at the same time setup 
out to restrict it.




Re: [OT] mobile rising

2017-11-09 Thread Ola Fosheim Grøstad via Digitalmars-d

On Thursday, 9 November 2017 at 14:42:41 UTC, Joakim wrote:
Do you blame them, given such anti-competitive measures long 
undertaken by MS and Apple?


Big businesses do what they can get away with. Once upon a time 
governments cared about anti-trust (E.g. AT&T and IBM), but 
nowadays it seems like they don't care much about enabling 
competition where smaller players get a shot. Governments seem to 
let the big multi-national corporations do what they want. It's 
not like MS was punished much for their behaviour…


(EU has mounted a little bit of resistance, but only thanks to 
individuals.)


There is some truth to this, but if you cannot compete with a 
free product- cough, cough, Windows Mobile- I don't know what 
to tell you.


I actually think the Microsoft phones looked quite appealing, but 
I didn't get the sense that Microsoft would back it up over time. 
Perception is king. Google had the same problem with Dart. They 
kept developing Dart, but after they announced that it didn't get 
into Chrome, many started to wonder if that was the beginning of 
the end.


 In other words, google cannot afford to spend a fraction of 
the money on Android that Apple spends on iOS, because google 
makes so little money off of Android by comparison, so there 
are disadvantages to their free model too.


As far as I can tell from the iOS APIs the internals doesn't seem 
to change all that much anymore. I'm sure they do a lot on 
hardware, drivers and tooling.


As I said earlier, the mobile OS story is not over yet, there 
are more changes to come.


Yes, that probably is true. The teenager/young adults segment can 
shift things real fast if someone push out a perfect mobile 
gaming-device.





Re: [OT] mobile rising

2017-11-09 Thread Jerry via Digitalmars-d

On Thursday, 9 November 2017 at 14:42:41 UTC, Joakim wrote:
There is some truth to this, but if you cannot compete with a 
free product- cough, cough, Windows Mobile- I don't know what 
to tell you.  In other words, google cannot afford to spend a 
fraction of the money on Android that Apple spends on iOS, 
because google makes so little money off of Android by 
comparison, so there are disadvantages to their free model too.
 It is one of the reasons why they have now plunged into the 
high-end smartphone market with their recent Pixel line.


I think the lack of a viable business model for Android 
vendors, other than Samsung, is a huge problem for the 
platform, as Apple hoovers up two-thirds of the profit with 
only a tenth of the phones sold:


https://www.counterpointresearch.com/80-of-global-handset-profits-comes-from-premium-segment/

As I said earlier, the mobile OS story is not over yet, there 
are more changes to come.


People that buy Android I find tend to keep their phones for 
longer. People with Apple phones keep buying new ones. Part of 
that is how many phone Apple claims are on the latest version. So 
developers only target the latest one, then their apps don't run 
on old phone and it encourages people to "upgrade". Android apps 
tend to support more versions as well, it's a more diverse OS. 
I've even seen websites that just straight up drop support for 
old versions of Safari. Can't get the latest version of Safari 
cause you can't update your phone. Then you go to firefox just to 
find out you can't install it cause it's no longer support for 
that iOS version. Can't even download an old version of firefox 
that did support it cause it's Apple's store and they don't 
support that.


Re: [OT] mobile rising

2017-11-09 Thread Joakim via Digitalmars-d
On Thursday, 9 November 2017 at 14:22:22 UTC, Ola Fosheim Grøstad 
wrote:
I also think we should add to this discussion that Google was 
hellbent on going forward with Android even when it was clearly 
inferior. Apple tried to squish out Google's services from 
their iOS products for a while. And that is exactly what Google 
tries to prevent by funding things like Chrome and Android.


Do you blame them, given such anti-competitive measures long 
undertaken by MS and Apple?


So for Google Chrome and Android does not have to make sense in 
business terms, it is basically an anti-competitive tool to 
protect their own hegemony (relative monopoly) by retaining 
critical mass and making it difficult for competitors to build 
up a competing product over time (you need a source of income 
while your product is evolving from mediocre to great to do 
that).


There is some truth to this, but if you cannot compete with a 
free product- cough, cough, Windows Mobile- I don't know what to 
tell you.  In other words, google cannot afford to spend a 
fraction of the money on Android that Apple spends on iOS, 
because google makes so little money off of Android by 
comparison, so there are disadvantages to their free model too.  
It is one of the reasons why they have now plunged into the 
high-end smartphone market with their recent Pixel line.


I think the lack of a viable business model for Android vendors, 
other than Samsung, is a huge problem for the platform, as Apple 
hoovers up two-thirds of the profit with only a tenth of the 
phones sold:


https://www.counterpointresearch.com/80-of-global-handset-profits-comes-from-premium-segment/

As I said earlier, the mobile OS story is not over yet, there are 
more changes to come.


Re: [OT] mobile rising

2017-11-09 Thread Joakim via Digitalmars-d
On Thursday, 9 November 2017 at 14:15:47 UTC, Ola Fosheim Grøstad 
wrote:

On Thursday, 9 November 2017 at 00:09:32 UTC, Joakim wrote:
smaller search company, did with Android, leaving aside Apple 
because of your silly claims that their existing software gave 
them a headstart, which is why those former computing giants 
are all either dead or fading fast.


It is hardly a silly claim:

NextStep (1989) ==> OS-X (2001) ==> iOS (2007)

That is 18 years of evolution and experience, and it also meant 
that they had the development tooling ready + experienced 
developers for their platform (macOS programmers). It also 
mattered a lot that Apple already had the manufacturing 
experience with prior attempts and also the streamlining of the 
iPod-line as well as the infrastructure for distribution and 
following up customers (again from the iPod line).


So, for Apple it was a relatively modest step to go from

 iPod + Mac frameworks + standard 3rd party chips + existing 
tooling + iTunes


 =>

iPhone

I think you are forgetting that hardly anyone wanted to develop 
apps for Android in the first few years. Android was pariah, 
and everybody did iOS apps first, then if it was a big success 
then maybe they would try to port it over to Android (but 
usually not).


I agree that Apple had an advantage in getting into the 
smartphone market, but MS, RIM, Nokia, etc. had much larger 
advantages in this regard.  And you continue to ignore that 
Android and google started their mobile OS from scratch and now 
ship on the most smartphones.  Of course, they just grabbed 
existing tech like the linux kernel, Java, and various other OSS 
projects and put it all together with code of their own, but 
that's something any of the computing giants and many other 
upstarts like HTC or Asus could have done.


Yet, they didn't, which suggests a lack of vision or some other 
technical ability than "OS expertise."


Re: [OT] mobile rising

2017-11-09 Thread Ola Fosheim Grøstad via Digitalmars-d
I also think we should add to this discussion that Google was 
hellbent on going forward with Android even when it was clearly 
inferior. Apple tried to squish out Google's services from their 
iOS products for a while. And that is exactly what Google tries 
to prevent by funding things like Chrome and Android.


So for Google Chrome and Android does not have to make sense in 
business terms, it is basically an anti-competitive tool to 
protect their own hegemony (relative monopoly) by retaining 
critical mass and making it difficult for competitors to build up 
a competing product over time (you need a source of income while 
your product is evolving from mediocre to great to do that).


Re: [OT] mobile rising

2017-11-09 Thread Ola Fosheim Grøstad via Digitalmars-d

On Thursday, 9 November 2017 at 00:09:32 UTC, Joakim wrote:
smaller search company, did with Android, leaving aside Apple 
because of your silly claims that their existing software gave 
them a headstart, which is why those former computing giants 
are all either dead or fading fast.


It is hardly a silly claim:

NextStep (1989) ==> OS-X (2001) ==> iOS (2007)

That is 18 years of evolution and experience, and it also meant 
that they had the development tooling ready + experienced 
developers for their platform (macOS programmers). It also 
mattered a lot that Apple already had the manufacturing 
experience with prior attempts and also the streamlining of the 
iPod-line as well as the infrastructure for distribution and 
following up customers (again from the iPod line).


So, for Apple it was a relatively modest step to go from

 iPod + Mac frameworks + standard 3rd party chips + existing 
tooling + iTunes


 =>

iPhone

I think you are forgetting that hardly anyone wanted to develop 
apps for Android in the first few years. Android was pariah, and 
everybody did iOS apps first, then if it was a big success then 
maybe they would try to port it over to Android (but usually not).





Re: [OT] mobile rising

2017-11-09 Thread Joakim via Digitalmars-d

On Thursday, 9 November 2017 at 12:27:49 UTC, Paulo Pinto wrote:

On Thursday, 9 November 2017 at 00:09:32 UTC, Joakim wrote:

...
I think you greatly overestimate what was needed to compete in 
this mobile market at that time.  I'm not saying it was easy, 
but the PC and mobile giants before iOS/Android clearly didn't 
have the vision or ability to execute what google, a much 
smaller search company, did with Android, leaving aside Apple 
because of your silly claims that their existing software gave 
them a headstart, which is why those former computing giants 
are all either dead or fading fast.


Google bought the company responsible for Hiptop, which was 
already developing Android, where the majority of employees 
were former BeOS employees, many of which are still on the 
Android team.


Not quite, the company responsible for the Hiptop was Danger, 
which was acquired by MS in 2008:


https://en.m.wikipedia.org/wiki/Danger_Inc.

Some key people left Danger to start Android before that, which 
is what you're thinking of.  I mentioned that 2005 google 
acquisition of Android earlier in this thread.  I'm not sure what 
point you're trying to make though, as HP, Sony, MS, Nokia, etc. 
had enough money to buy 50 such companies, ie google didn't have 
any resource or "OS expertise" advantage over those computing 
giants.  They certainly had a better vision for mobile and 
arguably other technical skills.


It's funny, everybody is now ridiculing the dismissive statements 
made by those giants when Android launched a decade ago:


https://www.engadget.com/2007/11/05/symbian-nokia-microsoft-and-apple-downplay-android-relevance/


Re: [OT] mobile rising

2017-11-09 Thread Paulo Pinto via Digitalmars-d

On Thursday, 9 November 2017 at 00:09:32 UTC, Joakim wrote:

...
I think you greatly overestimate what was needed to compete in 
this mobile market at that time.  I'm not saying it was easy, 
but the PC and mobile giants before iOS/Android clearly didn't 
have the vision or ability to execute what google, a much 
smaller search company, did with Android, leaving aside Apple 
because of your silly claims that their existing software gave 
them a headstart, which is why those former computing giants 
are all either dead or fading fast.


Google bought the company responsible for Hiptop, which was 
already developing Android, where the majority of employees were 
former BeOS employees, many of which are still on the Android 
team.