Warning in 1.0 +?

Makes sense. The deprecations I have seen are all pretty painless thus far. So its never been a big deal to just fix them. I wouldn’t switch languages over the fact that the language I was using improved, and I didn’t want to improve my code base. If it were that easy to start over in another language, it’d be 100x easier to just fix the warnings?

When I see “no possibility” regarding Julia, I pause. It seems everything is possible, in theory. Maybe it’s not a good idea to make a package to enable this possibility, but the OP probably could. I’m not even sure it’s too difficult. Another possibility, I brought up in another thread, was make it possible to call old Julia versions (like you call Python, e.g. through Polyglot.jl, I looked a bit into doing this). The downside brought up was old code might never get migrated then.

You’re right, “no possibility” should be extended to mean without any simple built in options. The deprecations were deliberately removed in 1.0, because otherwise, people would have written grumpy posts on the day of the 1.0.0 release that Julia can’t be a good language if they have deprecations on day zero.

And I wouldn’t go through the pain of trying to integrate an unsupported version of a pre-release language. Just porting code using 0.7 would be a better way to deal with the legacy work.

2 Likes

I’m not sure I understand the complaint. If I have some code that works for Julia 0.6, and I run it with Julia 0.7 to produce deprecation warnings, it should actually fail with an error on Julia 1.0, right?

3 Likes

Warnings in 0.7 are VERY USEFUL for both new and fear users. Experiences of advanced users have nothing to do with it. Why can’t they be an option in new eversions?

A simple example:
If I do not know that there is a Statistic(s?) package, then for user ‘mean’ does not exist in Julia

julia> mean(rand(10,10),1)
ERROR: UndefVarError: mean not defined
Stacktrace:
 [1] top-level scope at none:0

help?> mean
search: SegmentationFault macroexpand @macroexpand @macroexpand1 Meta numerator enumerate timedwait

Couldn't find mean
Perhaps you meant map, max, min, atan, read, real, tan, Real, Meta, merge, Main, map!, mark, mod, mod1 or modf
  No documentation found.

  Binding mean does not exist.

Perhaps you meant … max, min… but never mean ;/ my goodnes :wink:

Paul

Let’s see what happens in python…

4 Likes

:wink:

Search the julia documentation rather than the REPL. Julia Documentation · The Julia Language

These points were discussed in detail at the time when Statistics was moved out from Base. If you are interested, please look them up in the archives. There is very little point in restarting them 2 years later.

There is detailed advice on upgrading to 1.0, with

as a good starting point. Please respect the effort that people have put into these things by reading them first and following the advice there.

4 Likes

I work on 0.7 which has a lot of problems and I can’t jump on 1.3 and more because I don’t

uhhh, I do not understand. First, which problems 0.7 has? It should be basically equal to version 1.0 but with those warnings enabled, and 1.0 is the long term support version (it is the one I use to develop and most packages support it). You actually need the features of 1.3 or 1.4 in your code? If you do not, then I am not aware of any problems in developing using 0.7 until you feel confident in using versions 1.x.

If your code is valid 0.7/1.0 code, but you want to run with 1.x because of some optimization, then you may have multiple versions of Julia in your computer. You may have 0.7 and 1.3 installed, for example, and create links to them in your path as julia0.7 and julia1.3 and call the 0.7 version to check your code and the 1.3 to make use of any speedup improvements.

2 Likes

What you may be missing is that some things were deprecated so that the syntax can be reused for something else. So it is not possible to give warnings in later version, because that syntax is now valid.

An example is range, see

for details.

4 Likes

not only that, but the REPL with help?> is a separate package (IPython), literally most unfriendly language out there (/s)

@Henrique_Becker
Julia 0.7 is not this same like 1.0. Please try raaddlm 10^6 lines on 0.7 … is slower then Excel :wink: I indicated 2 yers ago …
Try Intall two or more version Julia on one user WIN… GR not works… many many many more…
Paul

No one is saying you should use 0.7 for production. Just use it to fix the warnings and switch to 1.x.

I don’t understand why you’re so resistant to following this advice. Considerable effort was put in from the Julia developers to make this transition as painless as possible; you should take advantage of that work to make your life easier.

7 Likes

Idea with ver 0.7 was great! This is obvious, I do, in particular, when I go back to old projects and I have to change them.
But now Julia is poor in hints (look above please with average), older versions were very friendly, which made Julia unique. She is now a hermetic.
Paul

Please do not personify a programming language (Julia Community - Standards). Also, until this comment:

Idea with ver 0.7 was great! This is obvious, I do, in particular, when I go back to old projects and I have to change them.

you gave no indication that you had heard this advice, and to the contrary you were just complaining about it in your post just above it. Why didn’t you just say that you accepted this advice much earlier in the conversation?

That appears to settle your original complaint. You also raised a concern about mean. Several others already responded, so it’s not so clear why this was relevant to my response to your concern about using Julia 0.7.

To try to extract something positive from this conversation: are you proposing that the UndefVarError should recommend using the Statistics package? If so, how do we decide where to cut this off? Just the standard library, any installed package, or any name exported by any registered Julia package? Do we ship the list with your version of Julia, so that it doesn’t update as people write new packages? Do you only allow exact matches or do we allow spelling mistakes? Will it be irritating when I mistype a variable as food (I meant foo) and I get a suggestion to load the Food.jl package?

6 Likes

I know it’s hard to say where to cut. I would bet inside Julia and outside incoming packages. Hints for Statistic, Linear Algebra, Dates, Primes, … I don’t know exactly, I used only part of the possibilities. Just all who was in Julia until 0.6.

I remember it was great for me when Julia was automaticly creating complex numbers with sgrt (-1) . These were “little things” that attract users and not force readers to write manuals about creating classes …:wink: Today in Julia there is a hint, that’s good. But if something is unambiguous, why not do it detrministically?

Paul

Wait, when was this?

2 Likes

If someone saw the need for it, maybe they could write a package that offered to search the standard library whenever a function call turned up an UndefVarError.

1 Like

many years ago… maybe it was matlab …:wink:
Paul
W dniu 2020-03-01 o 21:56, DNF via JuliaLang pisze: