[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

is it possible to turn a private method into a public one?

Lex Williams

9/5/2008 9:07:00 PM

hey guys !

could a private/protected method be turned into a public one ?
--
Posted via http://www.ruby-....

10 Answers

TPReal

9/5/2008 9:29:00 PM

0

Lex Williams wrote:
> hey guys !
>
> could a private/protected method be turned into a public one ?

class K
private
def m
end
# now m is private
public :m
# and now it is public
end

TPR.

--
Posted via http://www.ruby-....

Lex Williams

9/5/2008 9:39:00 PM

0

Thomas B. wrote:
> Lex Williams wrote:
>> hey guys !
>>
>> could a private/protected method be turned into a public one ?
>
> class K
> private
> def m
> end
> # now m is private
> public :m
> # and now it is public
> end
>
> TPR.

Thank you ! This will come in handy !
--
Posted via http://www.ruby-....

Dave Bass

9/6/2008 10:22:00 AM

0

Lex Williams wrote:
> Thank you ! This will come in handy !

Also, it's possible to bypass the protection using the Object#send
method. This is useful for unit-testing private methods.


--
Posted via http://www.ruby-....

Xavier Noria

9/6/2008 3:38:00 PM

0

On Fri, Sep 5, 2008 at 11:06 PM, Lex Williams <etaern@yahoo.com> wrote:

> could a private/protected method be turned into a public one ?

Sure.

On the one hand you can circumvect access control with Object#send:

object.send(:method_name_even_if_private, ...)

And yes, you indeed can change the visibility:

class C
private
def foo
puts "it works"
end
end

c = C.new
begin
c.foo
rescue
puts $!
C.send(:public, :foo)
c.foo
end
# =>
# private method `foo' called for #<C:0x22013c>
# it works

That public is similar to the private call in C, only done out of the
class and via #send because it is private.

It is interesting to note that we've been able to call the method on
an object that was created when #foo was private, as the raised
exception proves. That's because method calls are resolved on a per
call basis due to the dynamic nature of Ruby.

Allen W. McDonnell

10/29/2009 12:30:00 AM

0


"Dimensional Traveler" <dtravel@sonic.net> wrote in message
news:4ae7b6b7$0$1652$742ec2ed@news.sonic.net...
> Allen W. McDonnell wrote:
>> <yardian6666666@yahoo.com> wrote in message
>> news:1ed74f9c-ff04-4c6e-b767-ff5f1dcda5a1@m38g2000yqd.googlegroups.com...
>>> My name is Rusty. I am new to this newsgroup.
>>> If this subject was previously discussed, let me know.
>>>
>>> W-I the Japanese won the 2nd World War?
>>>
>>> I am new, so please help me out in writing the consequences of
>>> such a Japanese victory.
>>>
>>> I think the Emperor would still have had absolute power in the country
>>> and the generals of the army would continue to actually run the
>>> country. There would never be a democracy.
>>>
>>> The U.S. would be humiliated to sign a cease fire. Who knows
>>> what else might happen?
>>>
>>> Thanks for welcoming me in your group.
>>>
>>> -Rusty (Yardian)
>>
>> The only realistic way I have ever read of that they could manage this is
>> by concentrating all their navy building on Submarines, long range, well
>> armed and very plentiful. Probably need then to be equipped with
>> Schnorkle gear and the best available passive sonar, plus excellent
>> tactics and training for the crews. Give them all that and they can pre
>> position wolf packs and take out the Enterprise task force and the
>> Lexington task force on December 7th, then use their battleships as bait
>> to draw the American battleships out to sea and ambush them via submarine
>> as well. The USN and RN both had a sad faith in ASDIC/SONAR and it took
>> many hard lessons before improvements came along to make finding
>> submarines much more than luck.
>>
>> With an effective submarine blockade set to hit anything coming through
>> Panama and destroying the merchant marine that was already in the Pacific
>> it becomes virtually impossible for the USA to hold onto anything in the
>> Pacific, they can not resupply bases anywhere and they will fall one by
>> one as they run out of food and or ammunition. Oahu can hold out the
>> longest, it has a lot of Army and Marine troops on it and a halfway
>> descend capacity for food if emergency measures are taken to plant as
>> much land as possible to crops, but airborne reinforcements and supplies
>> from California to Hawaii will soon be one way flights as aviation
>> gasoline supplies on the islands run out.
>>
>> If the Japanese offer good terms, like the USA can keep Hawaii and
>> Alaska, they might get a negotiated cease fire or peace treaty. A great
>> deal depends on who the President is at the time and how poorly the US
>> has faired in trying to take back the Pacific from Japan. If everything
>> goes in the Japanese favor they MIGHT be able to get a peace on their
>> terms. The USA would need to not only get a fleet into the Pacific, but
>> be able to supply it logistically. If the Japanese submarines are
>> effective enough then that becomes extremely difficult for the USA to
>> accomplish. It doesn't matter what supplies are on the west coast if
>> they get sunk every time they are shipped into the Pacific.
>>
>> By the same token Japan can not take any of mainland Alaska or the USA
>> because logistics favor the USA on land. The Japanese need a quick
>> victory before the USA develops effective ASW ships and weapons and
>> builds enough of them on the East and Gulf coasts to be able to force
>> their way into the Pacific and defend the supply chains (SEALOC Seaborne
>> Lines of Communication). Once they USA manages that the Japanese are
>> going to be overwhelmed slowly but surely by the industrial might of the
>> USA. It has to be a quick victory, or after December 1943 it will be all
>> down hill.
>
> That "all subs all the time" strategy has weaknesses. First it requires
> an ASB level change in the thinking of Japanese naval planners. Second it
> requires an impossible advance in sub tech and tactics pre-war in order to
> be able to sink every single ship they attack every time. The Germans
> couldn't do that and they had a much smaller ocean to find shipping in and
> basically knew, to within a relatively small area, where that shipping was
> headed. If any significant percentage gets thru, and it will, then the US
> can build enough shipping and supplies to keep the islands supplied.
> Third it requires that US/UK ASW capabilities stagnate, which given that
> they're involved in an intense sub war seems *ahem* unlikely. Fourth, if
> the Japanese build nothing but subs, how are they going to invade the
> Allied territories without a surface fleet to move the invasion forces to
> those islands?
>
> Sorry, I don't see that as a "realistic" possibility.
>

Realistic in the sense that it would have been a more viable way to fight
the war, not in the sense that anything short of ASB intervention would make
it happen.

The Germans were not all that smart in how they fought with their submarine
fleet either, and a lot of the really powerful advances came too late to tip
the balance back in their favor.


Dimensional Traveler

10/29/2009 2:30:00 AM

0

Allen W. McDonnell wrote:
> "Dimensional Traveler" <dtravel@sonic.net> wrote in message
> news:4ae7b6b7$0$1652$742ec2ed@news.sonic.net...
>> Allen W. McDonnell wrote:
>>> <yardian6666666@yahoo.com> wrote in message
>>> news:1ed74f9c-ff04-4c6e-b767-ff5f1dcda5a1@m38g2000yqd.googlegroups.com...
>>>> My name is Rusty. I am new to this newsgroup.
>>>> If this subject was previously discussed, let me know.
>>>>
>>>> W-I the Japanese won the 2nd World War?
>>>>
>>>> I am new, so please help me out in writing the consequences of
>>>> such a Japanese victory.
>>>>
>>>> I think the Emperor would still have had absolute power in the country
>>>> and the generals of the army would continue to actually run the
>>>> country. There would never be a democracy.
>>>>
>>>> The U.S. would be humiliated to sign a cease fire. Who knows
>>>> what else might happen?
>>>>
>>>> Thanks for welcoming me in your group.
>>>>
>>>> -Rusty (Yardian)
>>> The only realistic way I have ever read of that they could manage this is
>>> by concentrating all their navy building on Submarines, long range, well
>>> armed and very plentiful. Probably need then to be equipped with
>>> Schnorkle gear and the best available passive sonar, plus excellent
>>> tactics and training for the crews. Give them all that and they can pre
>>> position wolf packs and take out the Enterprise task force and the
>>> Lexington task force on December 7th, then use their battleships as bait
>>> to draw the American battleships out to sea and ambush them via submarine
>>> as well. The USN and RN both had a sad faith in ASDIC/SONAR and it took
>>> many hard lessons before improvements came along to make finding
>>> submarines much more than luck.
>>>
>>> With an effective submarine blockade set to hit anything coming through
>>> Panama and destroying the merchant marine that was already in the Pacific
>>> it becomes virtually impossible for the USA to hold onto anything in the
>>> Pacific, they can not resupply bases anywhere and they will fall one by
>>> one as they run out of food and or ammunition. Oahu can hold out the
>>> longest, it has a lot of Army and Marine troops on it and a halfway
>>> descend capacity for food if emergency measures are taken to plant as
>>> much land as possible to crops, but airborne reinforcements and supplies
>>> from California to Hawaii will soon be one way flights as aviation
>>> gasoline supplies on the islands run out.
>>>
>>> If the Japanese offer good terms, like the USA can keep Hawaii and
>>> Alaska, they might get a negotiated cease fire or peace treaty. A great
>>> deal depends on who the President is at the time and how poorly the US
>>> has faired in trying to take back the Pacific from Japan. If everything
>>> goes in the Japanese favor they MIGHT be able to get a peace on their
>>> terms. The USA would need to not only get a fleet into the Pacific, but
>>> be able to supply it logistically. If the Japanese submarines are
>>> effective enough then that becomes extremely difficult for the USA to
>>> accomplish. It doesn't matter what supplies are on the west coast if
>>> they get sunk every time they are shipped into the Pacific.
>>>
>>> By the same token Japan can not take any of mainland Alaska or the USA
>>> because logistics favor the USA on land. The Japanese need a quick
>>> victory before the USA develops effective ASW ships and weapons and
>>> builds enough of them on the East and Gulf coasts to be able to force
>>> their way into the Pacific and defend the supply chains (SEALOC Seaborne
>>> Lines of Communication). Once they USA manages that the Japanese are
>>> going to be overwhelmed slowly but surely by the industrial might of the
>>> USA. It has to be a quick victory, or after December 1943 it will be all
>>> down hill.
>> That "all subs all the time" strategy has weaknesses. First it requires
>> an ASB level change in the thinking of Japanese naval planners. Second it
>> requires an impossible advance in sub tech and tactics pre-war in order to
>> be able to sink every single ship they attack every time. The Germans
>> couldn't do that and they had a much smaller ocean to find shipping in and
>> basically knew, to within a relatively small area, where that shipping was
>> headed. If any significant percentage gets thru, and it will, then the US
>> can build enough shipping and supplies to keep the islands supplied.
>> Third it requires that US/UK ASW capabilities stagnate, which given that
>> they're involved in an intense sub war seems *ahem* unlikely. Fourth, if
>> the Japanese build nothing but subs, how are they going to invade the
>> Allied territories without a surface fleet to move the invasion forces to
>> those islands?
>>
>> Sorry, I don't see that as a "realistic" possibility.
>>
>
> Realistic in the sense that it would have been a more viable way to fight
> the war, not in the sense that anything short of ASB intervention would make
> it happen.
>
> The Germans were not all that smart in how they fought with their submarine
> fleet either, and a lot of the really powerful advances came too late to tip
> the balance back in their favor.
>
You are calling for the Japanese in 1941 to use snorkels and similar
equipment which wasn't available at all until late 1944 or 1945 in OTL.
Even then not all of it was available to the Japanese. If its not in
ASB territory, its at least having a conversation with the ASB border
patrol. :D

--
7 Years - 2265 Experiments - 10 tons of explosives - 705 Myths
Myths - Will - Fall!

Allen W. McDonnell

10/29/2009 2:53:00 AM

0


"Dimensional Traveler" <dtravel@sonic.net> wrote in message
news:4ae8fe22$0$1643$742ec2ed@news.sonic.net...
> Allen W. McDonnell wrote:
>> "Dimensional Traveler" <dtravel@sonic.net> wrote in message
>> news:4ae7b6b7$0$1652$742ec2ed@news.sonic.net...
>>> Allen W. McDonnell wrote:
>>>> <yardian6666666@yahoo.com> wrote in message
>>>> news:1ed74f9c-ff04-4c6e-b767-ff5f1dcda5a1@m38g2000yqd.googlegroups.com...
>>>>> My name is Rusty. I am new to this newsgroup.
>>>>> If this subject was previously discussed, let me know.
>>>>>
>>>>> W-I the Japanese won the 2nd World War?
>>>>>
>>>>> I am new, so please help me out in writing the consequences of
>>>>> such a Japanese victory.
>>>>>
>>>>> I think the Emperor would still have had absolute power in the country
>>>>> and the generals of the army would continue to actually run the
>>>>> country. There would never be a democracy.
>>>>>
>>>>> The U.S. would be humiliated to sign a cease fire. Who knows
>>>>> what else might happen?
>>>>>
>>>>> Thanks for welcoming me in your group.
>>>>>
>>>>> -Rusty (Yardian)
>>>> The only realistic way I have ever read of that they could manage this
>>>> is by concentrating all their navy building on Submarines, long range,
>>>> well armed and very plentiful. Probably need then to be equipped with
>>>> Schnorkle gear and the best available passive sonar, plus excellent
>>>> tactics and training for the crews. Give them all that and they can
>>>> pre position wolf packs and take out the Enterprise task force and the
>>>> Lexington task force on December 7th, then use their battleships as
>>>> bait to draw the American battleships out to sea and ambush them via
>>>> submarine as well. The USN and RN both had a sad faith in ASDIC/SONAR
>>>> and it took many hard lessons before improvements came along to make
>>>> finding submarines much more than luck.
>>>>
>>>> With an effective submarine blockade set to hit anything coming through
>>>> Panama and destroying the merchant marine that was already in the
>>>> Pacific it becomes virtually impossible for the USA to hold onto
>>>> anything in the Pacific, they can not resupply bases anywhere and they
>>>> will fall one by one as they run out of food and or ammunition. Oahu
>>>> can hold out the longest, it has a lot of Army and Marine troops on it
>>>> and a halfway descend capacity for food if emergency measures are taken
>>>> to plant as much land as possible to crops, but airborne reinforcements
>>>> and supplies from California to Hawaii will soon be one way flights as
>>>> aviation gasoline supplies on the islands run out.
>>>>
>>>> If the Japanese offer good terms, like the USA can keep Hawaii and
>>>> Alaska, they might get a negotiated cease fire or peace treaty. A
>>>> great deal depends on who the President is at the time and how poorly
>>>> the US has faired in trying to take back the Pacific from Japan. If
>>>> everything goes in the Japanese favor they MIGHT be able to get a peace
>>>> on their terms. The USA would need to not only get a fleet into the
>>>> Pacific, but be able to supply it logistically. If the Japanese
>>>> submarines are effective enough then that becomes extremely difficult
>>>> for the USA to accomplish. It doesn't matter what supplies are on the
>>>> west coast if they get sunk every time they are shipped into the
>>>> Pacific.
>>>>
>>>> By the same token Japan can not take any of mainland Alaska or the USA
>>>> because logistics favor the USA on land. The Japanese need a quick
>>>> victory before the USA develops effective ASW ships and weapons and
>>>> builds enough of them on the East and Gulf coasts to be able to force
>>>> their way into the Pacific and defend the supply chains (SEALOC
>>>> Seaborne Lines of Communication). Once they USA manages that the
>>>> Japanese are going to be overwhelmed slowly but surely by the
>>>> industrial might of the USA. It has to be a quick victory, or after
>>>> December 1943 it will be all down hill.
>>> That "all subs all the time" strategy has weaknesses. First it requires
>>> an ASB level change in the thinking of Japanese naval planners. Second
>>> it requires an impossible advance in sub tech and tactics pre-war in
>>> order to be able to sink every single ship they attack every time. The
>>> Germans couldn't do that and they had a much smaller ocean to find
>>> shipping in and basically knew, to within a relatively small area, where
>>> that shipping was headed. If any significant percentage gets thru, and
>>> it will, then the US can build enough shipping and supplies to keep the
>>> islands supplied. Third it requires that US/UK ASW capabilities
>>> stagnate, which given that they're involved in an intense sub war seems
>>> *ahem* unlikely. Fourth, if the Japanese build nothing but subs, how
>>> are they going to invade the Allied territories without a surface fleet
>>> to move the invasion forces to those islands?
>>>
>>> Sorry, I don't see that as a "realistic" possibility.
>>>
>>
>> Realistic in the sense that it would have been a more viable way to fight
>> the war, not in the sense that anything short of ASB intervention would
>> make it happen.
>>
>> The Germans were not all that smart in how they fought with their
>> submarine fleet either, and a lot of the really powerful advances came
>> too late to tip the balance back in their favor.
> You are calling for the Japanese in 1941 to use snorkels and similar
> equipment which wasn't available at all until late 1944 or 1945 in OTL.
> Even then not all of it was available to the Japanese. If its not in ASB
> territory, its at least having a conversation with the ASB border patrol.
> :D
>

Actually it was successfully tested by the Italian navy in 1925 and
developed to a practical level by the Dutch navy before 1940. All you need
is for Japan to get the idea from the Italians in the 1920's and develop it
in secret for themselves.
http://en.wikipedia.org/wiki/Dutch_inventions_and_discoveries#Submari...

As for the other equipment, if they are pouring resources into Submarine
research and development instead of the 18.1" guns for the Yamato class
battleships they should be able to afford it. All that requires is that
they adopt 16" already existing guns for the Yamato class and use the
savings in R & D for the Submarines systems and training in effective
tactics. The IJN had some really great subs and commanders OTL, but their
tactics stunk on ice and that made them far less effective than they could
have been. Their submarine fleet was also very much a poor runt compared to
other naval vessels.


Dimensional Traveler

10/29/2009 8:48:00 AM

0

Allen W. McDonnell wrote:
> "Dimensional Traveler" <dtravel@sonic.net> wrote in message
> news:4ae8fe22$0$1643$742ec2ed@news.sonic.net...
>> Allen W. McDonnell wrote:
>>> "Dimensional Traveler" <dtravel@sonic.net> wrote in message
>>> news:4ae7b6b7$0$1652$742ec2ed@news.sonic.net...
>>>> Allen W. McDonnell wrote:
>>>>> <yardian6666666@yahoo.com> wrote in message
>>>>> news:1ed74f9c-ff04-4c6e-b767-ff5f1dcda5a1@m38g2000yqd.googlegroups.com...
>>>>>> My name is Rusty. I am new to this newsgroup.
>>>>>> If this subject was previously discussed, let me know.
>>>>>>
>>>>>> W-I the Japanese won the 2nd World War?
>>>>>>
>>>>>> I am new, so please help me out in writing the consequences of
>>>>>> such a Japanese victory.
>>>>>>
>>>>>> I think the Emperor would still have had absolute power in the country
>>>>>> and the generals of the army would continue to actually run the
>>>>>> country. There would never be a democracy.
>>>>>>
>>>>>> The U.S. would be humiliated to sign a cease fire. Who knows
>>>>>> what else might happen?
>>>>>>
>>>>>> Thanks for welcoming me in your group.
>>>>>>
>>>>>> -Rusty (Yardian)
>>>>> The only realistic way I have ever read of that they could manage this
>>>>> is by concentrating all their navy building on Submarines, long range,
>>>>> well armed and very plentiful. Probably need then to be equipped with
>>>>> Schnorkle gear and the best available passive sonar, plus excellent
>>>>> tactics and training for the crews. Give them all that and they can
>>>>> pre position wolf packs and take out the Enterprise task force and the
>>>>> Lexington task force on December 7th, then use their battleships as
>>>>> bait to draw the American battleships out to sea and ambush them via
>>>>> submarine as well. The USN and RN both had a sad faith in ASDIC/SONAR
>>>>> and it took many hard lessons before improvements came along to make
>>>>> finding submarines much more than luck.
>>>>>
>>>>> With an effective submarine blockade set to hit anything coming through
>>>>> Panama and destroying the merchant marine that was already in the
>>>>> Pacific it becomes virtually impossible for the USA to hold onto
>>>>> anything in the Pacific, they can not resupply bases anywhere and they
>>>>> will fall one by one as they run out of food and or ammunition. Oahu
>>>>> can hold out the longest, it has a lot of Army and Marine troops on it
>>>>> and a halfway descend capacity for food if emergency measures are taken
>>>>> to plant as much land as possible to crops, but airborne reinforcements
>>>>> and supplies from California to Hawaii will soon be one way flights as
>>>>> aviation gasoline supplies on the islands run out.
>>>>>
>>>>> If the Japanese offer good terms, like the USA can keep Hawaii and
>>>>> Alaska, they might get a negotiated cease fire or peace treaty. A
>>>>> great deal depends on who the President is at the time and how poorly
>>>>> the US has faired in trying to take back the Pacific from Japan. If
>>>>> everything goes in the Japanese favor they MIGHT be able to get a peace
>>>>> on their terms. The USA would need to not only get a fleet into the
>>>>> Pacific, but be able to supply it logistically. If the Japanese
>>>>> submarines are effective enough then that becomes extremely difficult
>>>>> for the USA to accomplish. It doesn't matter what supplies are on the
>>>>> west coast if they get sunk every time they are shipped into the
>>>>> Pacific.
>>>>>
>>>>> By the same token Japan can not take any of mainland Alaska or the USA
>>>>> because logistics favor the USA on land. The Japanese need a quick
>>>>> victory before the USA develops effective ASW ships and weapons and
>>>>> builds enough of them on the East and Gulf coasts to be able to force
>>>>> their way into the Pacific and defend the supply chains (SEALOC
>>>>> Seaborne Lines of Communication). Once they USA manages that the
>>>>> Japanese are going to be overwhelmed slowly but surely by the
>>>>> industrial might of the USA. It has to be a quick victory, or after
>>>>> December 1943 it will be all down hill.
>>>> That "all subs all the time" strategy has weaknesses. First it requires
>>>> an ASB level change in the thinking of Japanese naval planners. Second
>>>> it requires an impossible advance in sub tech and tactics pre-war in
>>>> order to be able to sink every single ship they attack every time. The
>>>> Germans couldn't do that and they had a much smaller ocean to find
>>>> shipping in and basically knew, to within a relatively small area, where
>>>> that shipping was headed. If any significant percentage gets thru, and
>>>> it will, then the US can build enough shipping and supplies to keep the
>>>> islands supplied. Third it requires that US/UK ASW capabilities
>>>> stagnate, which given that they're involved in an intense sub war seems
>>>> *ahem* unlikely. Fourth, if the Japanese build nothing but subs, how
>>>> are they going to invade the Allied territories without a surface fleet
>>>> to move the invasion forces to those islands?
>>>>
>>>> Sorry, I don't see that as a "realistic" possibility.
>>>>
>>> Realistic in the sense that it would have been a more viable way to fight
>>> the war, not in the sense that anything short of ASB intervention would
>>> make it happen.
>>>
>>> The Germans were not all that smart in how they fought with their
>>> submarine fleet either, and a lot of the really powerful advances came
>>> too late to tip the balance back in their favor.
>> You are calling for the Japanese in 1941 to use snorkels and similar
>> equipment which wasn't available at all until late 1944 or 1945 in OTL.
>> Even then not all of it was available to the Japanese. If its not in ASB
>> territory, its at least having a conversation with the ASB border patrol.
>> :D
>>
>
> Actually it was successfully tested by the Italian navy in 1925 and
> developed to a practical level by the Dutch navy before 1940. All you need
> is for Japan to get the idea from the Italians in the 1920's and develop it
> in secret for themselves.
> http://en.wikipedia.org/wiki/Dutch_inventions_and_discoveries#Submari...
>
> As for the other equipment, if they are pouring resources into Submarine
> research and development instead of the 18.1" guns for the Yamato class
> battleships they should be able to afford it. All that requires is that
> they adopt 16" already existing guns for the Yamato class and use the
> savings in R & D for the Submarines systems and training in effective
> tactics. The IJN had some really great subs and commanders OTL, but their
> tactics stunk on ice and that made them far less effective than they could
> have been. Their submarine fleet was also very much a poor runt compared to
> other naval vessels.
>
Yabut, you're postulating a _serious_ change in IJN thinking going all
the way back to at least the early '30s. Gonna have all kinds of
knock-on effects. *shrug*

--
7 Years - 2265 Experiments - 10 tons of explosives - 705 Myths
Myths - Will - Fall!

Michele

10/29/2009 10:06:00 AM

0


"Allen W. McDonnell" <tanada@peakoil.com> ha scritto nel messaggio
news:hc8bdg$8qs$1@news.eternal-september.org...

>
> The only realistic way I have ever read of that they could manage this is
> by concentrating all their navy building on Submarines, long range, well
> armed and very plentiful. Probably need then to be equipped with
> Schnorkle gear and the best available passive sonar, plus excellent
> tactics and training for the crews. Give them all that and they can pre
> position wolf packs and take out the Enterprise task force and the
> Lexington task force on December 7th, then use their battleships as bait
> to draw the American battleships out to sea and ambush them via submarine
> as well. The USN and RN both had a sad faith in ASDIC/SONAR and it took
> many hard lessons before improvements came along to make finding
> submarines much more than luck.

That might happen, with the advantage of surprise.

>
> With an effective submarine blockade set to hit anything coming through
> Panama and destroying the merchant marine that was already in the Pacific
> it becomes virtually impossible for the USA to hold onto anything in the
> Pacific, they can not resupply bases anywhere and they will fall one by
> one as they run out of food and or ammunition. Oahu can hold out the
> longest, it has a lot of Army and Marine troops on it and a halfway
> descend capacity for food if emergency measures are taken to plant as much
> land as possible to crops, but airborne reinforcements and supplies from
> California to Hawaii will soon be one way flights as aviation gasoline
> supplies on the islands run out.
>

That ain't going to happen. Even German wolf packs were mainly effective
against slooow convoys, and they tended to fare badly once the convoys had
their own airborne ASW capabilities. The Pacific is bigger than the Northern
Atlantic. So the Japanese might initially hamper US shipping with their
all-sub navy, but they aren't going to hit many carriers and battleships,
once they have no longer the surprise, and later on, even merchant convoys,
if escorted by carriers with ASW aircraft, are going to have fine chances to
get through.

On top of that, the all-sub IJN isn't going to be able to carry out massive
landing operations. They'd still need carriers for air power, battleships
for bombardment, and above all cruisers and destroyers to escort their troop
ships. If they cut on all of that, the Allied subs and aircraft will shred
the Japanese invasion forces, even if there is not one Allied warship still
afloat thanks to the all-sub IJN.
Remember, the point is to seize Dutch oil and Singapore rubber. You can't do
that with subs and cargo ships only.

On top of that, the all-sub IJN isn't going to be able to protect the
_Japanese_ convoys. The Allies still have subs of their own.

Taking a step back, it is possible, though not certain given the level of
closedness of the Japanese society, that somebody spots the major, dramatic
shift in Japanese building programs. And reacts accordingly.

If nobody noticed that timely, then they will notice during the war, and the
USA still have the industrial power to make good for the delay.

Note how hard was the sub war against the Kriegsmarine. Incredibly high
figures of lost shipping, materials and men. Apparently unsustainable
percentages. Yet the Allies sustained them. Even if the all-sub IJN is ten
times stronger than the German U-Boot arm, the Pacific remains larger, with
more destinations than the British Isles, and there are limits to the
realistically feasible speed and range of subs. Add that the British were
reading the U-Boote's mail some of the time, but the US will be reading the
all-sub IJN's mail all of the time.

Any measure short of an all-out sub-only navy is going to help the Japanese
some, sure. The war won't be the same. More embarrassments for the Allies.
But a Japanese victory? Nah.





Michele

10/29/2009 10:38:00 AM

0


"Jack Linthicum" <jacklinthicum@earthlink.net> ha scritto nel messaggio
news:78573e71-6fec-434c-9b8a-

> Not really. Early on, the Japanese put 25 submarines around Oahu for
the Pearl operation, nine of these shifted to the West Coast in
December 1941 and January 1942.

I'd be curious to know how much time they spent in transit and how much in
ambush, but I'll confess I'm too lazy to look that up.

> A continuous patrolling of either
area, concentrating on killing supplies and getting the occasional
warship, rather than the reverse, would have strained the capabilities
of the 1942 Navy and reduced morale at either area significantly. The
small amount of action in 1942 had the West Coast in a panic, with
stories multiplied by rumor.

The _East_ Coast saw initially quite heavy losses to German subs, who
concentrated on the shipping. I don't know if morale was significantly
affected. Of course civilians go into a panic at the start of a war. The
British or German civilians got used to it and went on. I'd suppose the US
civilians would, too.