PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 10th, 2012, 06:15 PM
rstoll rstoll is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 rstoll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m
Reputation Power: 0
Type safety in PHP

Hi,

I am currently working on my final project of my undergraduate study and the project is about type safety in PHP. One aspect of the project examines the opinion of the PHP community on this topic.

I now need your help. I would be very glad, if you could take 5 – 20 minutes to fill in my online survey: http://www.q-set.co.uk/q-set.php?sCode=PGSKQCJUWZVK

I will publish the deliverables of my project under an open source license. Thus you contribute automatically to an open source project if you fill in the form

Thanks for your help
Robert Stoll

Reply With Quote
  #2  
Old December 10th, 2012, 06:42 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,717 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 7 h 29 m 55 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Quote:
1. Do you think type safety in PHP should be improved?

Your survey consists mostly of loaded questions. Of course PHP should be improved! Where's the question about whether I consider PHP to be lacking in this area?

Quote:
2. Should the following improvement towards type safety be made?
PHP Code:
public function setName(string name){ 
//...


The "improvement" is vague, not to mention an incorrect sample of PHP code. Must the variable be of a string type? Is it cast to string if not?

Quote:
7. Templates, files which will be included respectively (include 'template.php';) - which improvement towards type safety should be made?

This doesn't address type safety. It's a question of defining variables on-the-fly. Related, sure, but a different topic.

Quote:
I want to introduce shortly my project with the title 'Type-Safe PHP: A compile time approach'.
...
Please consider in the following questions, that an improvement does not include any change to PHP but can be realised with TSPHP [Type-Safe PHP].
...

It certainly would change PHP: you're redefining the syntax for the language. If I were to write for your tool I would not be writing PHP anymore - I would be writing "TSPHP".

Quote:
12. If you could wish, in which time should TSPHP (with complete support for type safety) be developed, regardless of whether it is feasible or not?

Wait... So if the project is unfeasible then do I enter "infinity"?

Quote:
13. Which of the following concepts should be supported by TSPHP?

Enums, generics, operator overloading, properties, object initializers, list-style object initializers, catching multiple exceptions at once... These are all features in other languages. I'll say it again because it seems you've lost track: this is not PHP anymore. C# is cool and all and I really do love it (screw Java), but I also love PHP because it's not C#.

Quote:
15. Which IDE do you use mostly (would you define as "your IDE")?
16. How satisfied are you with...

What does this have to do with strong typing? I get that later questions are about establishing a background for the interviewee but IDE?

Quote:
27. At which trigger point is TSPHP relevant to the PHP community?

Who am I asking? "The community"? Which one? Made up of what type of people?

Also, have you seen the Type-checking RFC?
Also, that site is reeeaaallly slow.

Reply With Quote
  #3  
Old December 10th, 2012, 07:16 PM
rstoll rstoll is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 9 rstoll User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 3 m
Reputation Power: 0
First of all, thanks for your answer.

Quote:
Originally Posted by requinix
Your survey consists mostly of loaded questions. Of course PHP should be improved!

Well, I am sure not everyone will have the same opinion as you have. I read many times statements such as, "no, to complicated", "PHP was always a weak typed system and every attempt to improve it is evil" etc.

Quote:
Originally Posted by requinix
Where's the question about whether I consider PHP to be lacking in this area?

These question should come once


Quote:
Originally Posted by requinix
The "improvement" is vague, not to mention an incorrect sample of PHP code. Must the variable be of a string type? Is it cast to string if not?

As mentioned the improvements are not yet applicable in PHP. It's an example how scalar types could be defined for parameters in a later PHP version (or in TSPHP).

Quote:
Originally Posted by requinix
This doesn't address type safety. It's a question of defining variables on-the-fly. Related, sure, but a different topic.

I mostly agree, I am just curious what people think about this related topic.

Quote:
Originally Posted by requinix
It certainly would change PHP: you're redefining the syntax for the language. If I were to write for your tool I would not be writing PHP anymore - I would be writing "TSPHP".

Cannot agree on this one, PHP would remain as it is today, but yes, the developer would need to write TSPHP instead of PHP with this approach. Do you agree that we could say, if one want type safety he should use TSPHP if one doesn't care the should stick to PHP?

Quote:
Originally Posted by requinix
Wait... So if the project is unfeasible then do I enter "infinity"?

Hm... maybe I have asked my question wrong or it's not clear enough. I wanted to say enter your desired time regardless if it is feasible to develop TSPHP in this time.

Quote:
Originally Posted by requinix
Enums, generics, operator overloading, properties, object initializers, list-style object initializers, catching multiple exceptions at once... These are all features in other languages. I'll say it again because it seems you've lost track: this is not PHP anymore. C# is cool and all and I really do love it (screw Java), but I also love PHP because it's not C#.

You are right, that's not PHP at all and I wanted to know if you miss one of those concepts in PHP.

Quote:
Originally Posted by requinix
Which IDE do you use mostly (would you define as "your IDE")?
16. How satisfied are you with...
What does this have to do with strong typing? I get that later questions are about establishing a background for the interviewee but IDE?

Indirectly it has something to do with type safety. You said you are familiar with C#. I am sure you aware of the support of the language within the IDE.

Quote:
Originally Posted by requinix
Who am I asking? "The community"? Which one? Made up of what type of people?

I know, it's a realy hypothetical question.

Quote:
Originally Posted by requinix
Also, have you seen the Type-checking RFC?

Yes I have seen all RFC relating to type safety, but thank you.

Quote:
Originally Posted by requinix
Also, that site is reeeaaallly slow.

Yes unfortunately. you cannot image how long it takes to set up an online survey and you wouldn't change to another platform either. Futhermore q-set is free and has many good features (as rules, jumping etc) which other services do not provide.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Type safety in PHP

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap