Python has had type hints for ages 
https://docs.python.org/3/library/typing.html. If you use an IDE you can set 
the review to block commits if liniting fails. 

If you’re care so much about Java catching errors at compile time then why 
don’t you use Kotlin instead? NPE’s are one of the most common form of Java 
runtime errors that can be eliminated using Kotlins null safety. 

> On 19 Mar 2024, at 7:30 am, Andrew Rowley <and...@blackhillsoftware.com> 
> wrote:
> 
> On 19/03/2024 9:53 am, Pew, Curtis G wrote:
>> You get used to the “significant indentation” thing pretty quickly. It 
>> really makes sense: you should be indenting blocks anyway to make them easy 
>> to read, so why clutter things up with braces or keywords?
>> 
>> Most scripting languages (including REXX) don’t require declaring variables. 
>> Since there’s no separate compile step you get the errors when they happen 
>> in any case, so declaring variables doesn’t buy you much.
> 
> I probably would get used to significant indentation, although I do indent 
> for readability and I'm not sure I want to be mixing readability and logic in 
> the same construct.
> 
> Explicitly declaring variables has a number of advantages:
> 
> - it flags errors due to e.g. misspellings
> 
> - it flags errors when you intend to create a new variable but reuse an 
> existing one
> 
> - it checks data types, e.g. for SMF data if you have a ZonedDateTime you 
> can't assign/compare a LocalDateTime without specifying the time zone. So the 
> class designers can protect you form a whole heap of common errors, and flag 
> them before the program starts.
> 
> -- 
> Andrew Rowley
> Black Hill Software
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to