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

Re: How to write (existential) predicates with maps/Wh

Subject: Re: How to write (existential) predicates with maps/Why is there no effective boolean value for a map?
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Feb 2019 08:45:38 -0000
Re:  How to write (existential) predicates with maps/Wh
On Wed, Feb 13, 2019 at 7:18 AM Dimitre Novatchev dnovatchev@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> > When I started this I was fairly neutral about it, but I've now used
> Javascript enough to form a strong distaste for weak typing.
>
> What about Typescript?
>

Sorry, if this is off topic.

I've been reading about Typescript, during this thread. On the link,
https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html
following sample program appears,

<quote>

 class Student {
fullName: string; constructor(public firstName: string, public
middleInitial: string, public lastName: string) { this.fullName = firstName
+ " " + middleInitial + " " + lastName; } } interface Person { firstName:
string; lastName: string; } function greeter(person : Person) { return "Hello,
" + person.firstName + " " + person.lastName; } let user = new Student(
"Jane", "M.", "User"); document.body.innerHTML = greeter(user);

</quote>

I'm not been convinced, how above typescript program can be correct. A
Student object is being created (with the let statement), and it is passed
to the greeter function. The greeter function is defined to accept Person
(interface). In the above program, there is no syntactic link between
Student and Person (class Student is not written implementing the interface
Person, and the structures of class Student and interface Person are
different).




-- 
Regards,
Mukul Gandhi

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.