Re: [Cython] [FEATURE REQUEST] VisualBasic
Thanks for reply @Sturla. 1) Sturla>>> Originally Fortran's "implicit none". Zaxebo>> Yes, you are right :-) --- 2) Sturla>>> I am not sure why you use Python (including Cython) if you prefer to turn off duck typing, though. You know where to find Java or C++ if that is what you want. Zaxebo>> I am NOT saying to implement datatyping(that is already part of cython by "cdef int","cdef double"). I am NOT saying to turn off duck typing. What i am requesting is: declaration of variables without data typing (like: cdef "var" ). And "optionally making them to be explicit". It is not required to make each variables data type to be put in the program, only declared as: cdef var a1 So there is no problem to the concept of duck typing in this case. Hence Again , THEIR PRE-DECLARATION (using "var") is to be made explicit, not their datatypes ("int,double" etc do not need to be specified). Hence, we are not making duck typing off. We are still using datatype. --- 3) If this idea seems acceptable and in congruence with cython philosophy, then I can humbly offer some token amount as sponsor in my individual capacity to the implementor, for this feature to be implemented in cython in a prioritised timeframe. Zaxebo1 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
ooops,following line in my earlier email: "We are still using datatype." should be read as: "We are still using duck datatyping." Zaxebo1 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
Zaxebo Yaxebo wrote: > > Zaxebo>> > I am NOT saying to implement datatyping(that is already part of cython by > "cdef int","cdef double"). I am NOT saying to turn off duck typing. > What i am requesting is: declaration of variables without data > typing (like: cdef "var" ). And "optionally making them to be explicit". > It is not required to make each variables data type to be put in the > program, only declared as: > cdef var a1 >So there is no problem to the concept of duck typing in this case. > > Hence Again , THEIR PRE-DECLARATION (using "var") is to be made explicit, > not their datatypes ("int,double" etc do not need to be specified). Hence, > we are not making duck typing off. We are still using datatype. Ok, so it is to guard against spelling errors? Sturla ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
Sturla>>> Ok, so it is to guard against spelling errors? Yes, thats a real big problem, once . Others are sufferring from this too, as i mentioned in my original post Here are other people also requesting the similar thing: http://stackoverflow.com/questions/613364/is-there-a-need-for-a-use-strict- python-compiler http://stackoverflow.com/questions/13425715/does-python-have-a-use-strict- and-use-warnings-like-in-perl http://stevesprogramming.blogspot.in/2013/03/why-python-needs-perls-use- strict.html http://bytes.com/topic/python/answers/632587-python-feature-request-explicit- variable-declarations As cython already implements "cdef int a1","cdef double a2" type statements, so implementing "cdef var a1" and optionally making their explicit declaration on, should be a do-able thing. This "explcit declaration of variables - on" can be made by the programmer - either by "cython.option_strict(True)" or by some command line option to cython. == As i already mentioned, if this idea is fine with cython community then I am ready to donate some token money for implementation of this feature as soon as possible. Zaxebo1 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
Zaxebo Yaxebo schrieb am 05.11.2014 um 19:35: > Sturla>>> Ok, so it is to guard against spelling errors? > > Yes, thats a real big problem, once . > > Others are sufferring from this too, as i mentioned in my original post > > Here are other people also requesting the similar thing: > http://stackoverflow.com/questions/613364/is-there-a-need-for-a-use-strict- > python-compiler > http://stackoverflow.com/questions/13425715/does-python-have-a-use-strict- > and-use-warnings-like-in-perl > http://stevesprogramming.blogspot.in/2013/03/why-python-needs-perls-use- > strict.html > http://bytes.com/topic/python/answers/632587-python-feature-request-explicit- > variable-declarations > > As cython already implements "cdef int a1","cdef double a2" type statements, > so implementing "cdef var a1" and optionally making their explicit > declaration on, should be a do-able thing. This has come up a couple of times before, so there are certainly some people who would benefit from a directive that enables warnings specifically about inferred Python object variables. > This "explcit declaration of variables - on" can be made by the programmer - > either by "cython.option_strict(True)" or by some command line option to > cython. A directive, see Options.py. There are already two directives called "warn.undeclared" and "infer_types.verbose". Combining those should get close to what you are looking for. Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
Stefan>>> A directive, see Options.py. There are already two directives called "warn.undeclared" and "infer_types.verbose". Combining those should get close to what you are looking for. Zaxebo1>> thanks. it works as i wished. You are really really my saviour. === Now only thing left, is that I will NOT want to declare the type of each variable as cdef int a1 cdef double a2 I will also want an additional option of "var", so that I can take advantage of DUCK TYPING etc etc, as in: cdef var a3 If this small leftover feature-request of "cdef var" is implemented, then there is nothing like it:-) :-) thanks again Zaxebo1 ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] [FEATURE REQUEST] VisualBasic
Zaxebo Yaxebo schrieb am 06.11.2014 um 02:35: > Stefan>>> A directive, see Options.py. There are already two directives > called "warn.undeclared" and "infer_types.verbose". Combining those should > get close to what you are looking for. > > Zaxebo1>> thanks. it works as i wished. You are really really my saviour. > > === > Now only thing left, is that I will NOT want to declare the type of each > variable as > cdef int a1 > cdef double a2 > I will also want an additional option of "var", so that I can take advantage > of DUCK TYPING etc etc, as in: > cdef var a3 Do you mean like cdef object a3 or cdef a3 ? Because that already exists and assigns type "arbitrary Python object" to the variable. If you want to be more specific, use fused types (a.k.a. generics). Stefan ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel
[Cython] New function (pointer) syntax.
I'd like to propose a more pythonic way to declare function pointer types, namelye type0 (*[ident])(type1, type2, type3) would instead become (type1, type2, type3) -> type0 [ident] I have a pull request up at https://github.com/cython/cython/pull/333; what do people think? - Robert ___ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel