[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: typescript [was: Re: How to write (existential) p

Subject: Re: typescript [was: Re: How to write (existential) predicates with maps/Why is there no effective boolean value for a map?]
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Feb 2019 22:11:37 -0000
Re: typescript [was: Re:  How to write (existential)  p
On Wed, 2019-02-13 at 15:13 +0000, Dimitre Novatchev
dnovatchev@xxxxxxxxx wrote:
> On Wed, Feb 13, 2019 at 3:08 AM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> .....
> 
> > Typescript uses structural typing, not named typing.
> 
> Actually this statement is not entirely correct -- a Typescript
> programmer can use both. To achieve strict typing, which people like
> me would prefer, just change:
>    class Student { ...}
> to
>   class Student implements Person { ...}

Kinda - i think this doesn't do what people might expect if they come
from a strict static typing world, and of course you can leave it off
and not notice... but you're right, it's a way to make that link more
explicit. However, "implements" has other effects, e.g. on subclassing
a subclass, so it's not only enabling strict(er) typing.

> I believe that offering differing typing choices (starting from no
> typing at all -- all Javascript code is valid in Typescript as
> Typescript is a superset of Javascript) is an intentionally-designed
> flexibility in the language.

Yes - to get any traction at all they needed to support existing
libraries, for one thing.

>  Of course, many developers such as myself
> would use just strict typing style, so that when the transpiler
> reports typing errors one will correct them even before compile-time.

I'd prefer that too.

Liam


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Web slave for vintage clipart http://www.fromoldbooks.org/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.