PyHP-pph / PyHP_pph

This repository serves as a centre for collaboration on the PyHP++# language. It will also include a functioning interpreter and compiler for PyHP++# once the standard is finalised.
https://www.reddit.com/r/PyHP_pph/
GNU Affero General Public License v3.0
23 stars 3 forks source link

Arrays #32

Open Kampfkarren opened 7 years ago

Kampfkarren commented 7 years ago

How will arrays be done? Will it be like PHP and Python where you just do []? Will it be like C where you put [size]? Will it be like C++ or C# where we have one quadrillion different array types?

ghost commented 7 years ago

I think we should have an Array class, similar to PHP's:

$MyArray = new Array(1, 2, 3);
Console.StandardOutputStream >> $MyArray[1] >> Console.Characters.EndLine;
del $MyArray;

Outputs:

2
as-com commented 7 years ago

@alexbuzzbee We should make PyHP++# Pure OOP™ like Java, so there shouldn't be brackets notation...

Console.StandardOutputStream >> disp($myArray->get(1)) >> Console.Characters.EndLine;

...but this doesn't happen in C#. What do you think?

ghost commented 7 years ago

All of our inspiration languages support brackets syntax. I think we should be careful when considering anything that would deviate from the inspiration languages.

as-com commented 7 years ago

Speaking of inspiration languages, I was thinking of renaming this thing to Objective-JPyHPScriptTRANsh++#JIT.NET Business Oriented Query Language 6. That way we could draw from Objective-C, Java, Python, PHP, (Java|Action|Type|Apple)Script, FORTRAN, Bash/Shell, LuaJIT, C++, C#, Visual Basic.NET, COBOL, SQL, and Perl6. 😛

ghost commented 7 years ago

Let's... not...

Kampfkarren commented 7 years ago

@alexbuzzbee You don't want a .ojpyhpstranshppsjitnetboql6 file?

ghost commented 7 years ago

No.

ChemtrailPilot12 commented 5 years ago

rip