Swift Playgrounds

Want to talk about something that isn't covered by another category?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Swift Playgrounds

Post by richmond62 » Wed May 18, 2022 7:11 pm

For all the wrong reasons I downloaded this:

https://www.apple.com/swift/playgrounds/

And decided to have a go, and while I was there start sucking my thumb and
pretend I was 9 years old.

So I went through some screens which all seemed lovely until I hit this one:
-
SShot 2022-05-18 at 20.59.55.png
-
and saw 'mashed-together words' and then 'Code is punctuated and spaced like human language, but
commands have no space between words' which threw me right off:

1. Commands don't ALWAYS have no space between words: not in LiveCode they don't.

2. Sanskrit has words mashed together, in fact so mashed together the word boundaries undergo
phonetic changes according to strict rules called sandhi.

3. 'punctuated': well, some languages are, some aren't.

4. What are 'parentheses'? OK, OK, I heard of them for the first time when I was 30 when I went to
the USA.

This is almost as bad as expecting everyone to answer 'yellow' to 'What colour is a banana?'

Stumping off for a drink.
Last edited by richmond62 on Thu May 19, 2022 11:42 am, edited 4 times in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Swift Playgrounds

Post by FourthWorld » Wed May 18, 2022 8:35 pm

1. Is that Apple tutorial for Swift or LiveCode?

2. Does swift's localization extend to being able to program in Sanskrit?

3. See 1.

4. Parentheses are the notation most languages use to contain parameters. A notable exception is Pascal, which is among the few languages which have two handler types, where only functions have parents.

Pascal was used throughout Apple when HyperCard had a scripting language added to it. Since scripting is essentially programming-lite, it's natural that the language the inventor was immersed in shaped the flavor of the scripting language he was inventing. It's quite possible that had HC been invented a few years later it might have had as much C inspiration as it has Pascal. And since most other scripting languages were invented after C had achieved dominance, it's not surprising that they often share common characteristics like having only one handler type, semicolon statement termination, 0-based counting, etc.

Just a few years of remaining production life for Pascal at Apple was the difference between HyperCard and later scripting languages.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

stam
Posts: 2633
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Swift Playgrounds

Post by stam » Wed May 18, 2022 11:51 pm

richmond62 wrote:
Wed May 18, 2022 7:11 pm
For all the wrong reasons I downloaded this:

https://www.apple.com/swift/playgrounds/
Are you complaining that command names are mashed up words? That’s literally universal for all languages including LiveCode (parameters don’t count as function/command names - well they do in some languages that allow overloading but ignore that as there is no equivalent in LC).

Are you objecting to the word “parenthesis”? I presume as opposed to brackets or some such? In fact parenthesis is the correct word for it, and has its root in Greek.

Are you complaining that in Swift, functions and commands both use parentheses for parameters? For me that’s more logical, I never really feel comfortable passing parameters for a command as a series of words without some way to the list of parameters… with, say, parentheses ;)

Are you complaining that the Swift playground isn’t used for Sanskrit?

You do know this is for Swift, not LiveCode, right?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Swift Playgrounds

Post by richmond62 » Thu May 19, 2022 7:26 am

Wow: lots of 'hubbub'. 8)
1. Is that Apple tutorial for Swift or LiveCode?
For Swift.
2. Does swift's localization extend to being able to program in Sanskrit?
What a funny question.

What I object to is this: "is punctuated and spaced like human languages" because a very large amount of written
languages are neither punctuated nor spaced (and all human, i.e. spoken, languages are neither punctuated nor spaced).

So, as I stated:

"This is almost as bad as expecting everyone to answer 'yellow' to 'What colour is a banana?'"

i.e. culture-bound and discriminatory.

And, because of this a lot of would-be programmers could be badly put off.
-
rBananas.jpeg
rBananas.jpeg (4.3 KiB) Viewed 2258 times
-
"Code is punctuated and spaced like human languages": even if we define 'human languages' as the one or two spoken
by the people who devised Swift, they should have known better:
-
SShot 2022-05-19 at 9.29.37.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9285
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Swift Playgrounds

Post by richmond62 » Thu May 19, 2022 7:38 am

My main objection to the Swift Playground intro stuff is that it is already far too presumptuous
(that learners are all from some sort of WASPY type of educational environment), and even at
that point, probably beyond the level of understanding of the average 9-11 year old.
In fact parenthesis is the correct word for it, and has its root in Greek.
Well:

1. Considering this is being posted on something called "Forums", not "Fora" this is a hilarious justification.

2. As Apple wouldn't know correct English Grammar if it hit them in the face this is a hilarious justification:
-
SShot 2022-05-19 at 9.36.51.png
-
https://www.apple.com/swift/playgrounds/
-
SShot 2022-05-19 at 9.46.13.png

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Swift Playgrounds

Post by FourthWorld » Thu May 19, 2022 11:33 am

richmond62 wrote:
Thu May 19, 2022 7:26 am
What I object to is this: "is punctuated and spaced like human languages" because a very large amount of written
languages are neither punctuated nor spaced (and all human, i.e. spoken, languages are neither punctuated nor spaced).
Yeah, I can see that. Thanks.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply

Return to “Off-Topic”